Package for this problem was not updated by the problem writer or Codeforces administration after we’ve upgraded the judging servers. To adjust the time limit constraint, solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then value 800 ms will be displayed and used to determine the verdict.

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

K. Testing

time limit per test

2 secondsmemory limit per test

64 megabytesinput

standard inputoutput

standard outputYou take part in the testing of new weapon. For the testing a polygon was created. The polygon is a rectangular field *n* × *m* in size, divided into unit squares 1 × 1 in size. The polygon contains *k* objects, each of which is a rectangle with sides, parallel to the polygon sides and entirely occupying several unit squares. The objects don't intersect and don't touch each other.

The principle according to which the weapon works is highly secret. You only know that one can use it to strike any rectangular area whose area is not equal to zero with sides, parallel to the sides of the polygon. The area must completely cover some of the unit squares into which the polygon is divided and it must not touch the other squares. Of course the area mustn't cross the polygon border. Your task is as follows: you should hit no less than one and no more than three rectangular objects. Each object must either lay completely inside the area (in that case it is considered to be hit), or lay completely outside the area.

Find the number of ways of hitting.

Input

The first line has three integers *n*, *m* и *k* (1 ≤ *n*, *m* ≤ 1000, 1 ≤ *k* ≤ 90) — the sizes of the polygon and the number of objects on it respectively. Next *n* lines contain *m* symbols each and describe the polygon. The symbol "*" stands for a square occupied an object, whereas the symbol "." stands for an empty space. The symbols "*" form exactly *k* rectangular connected areas that meet the requirements of the task.

Output

Output a single number — the number of different ways to hit a target.

Examples

Input

3 3 3

*.*

...

*..

Output

21

Input

4 5 4

.*.**

...**

**...

...**

Output

38

Input

2 2 1

.*

..

Output

4

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Aug/08/2020 04:10:46 (g2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|