Submit solution


Points: 1
Time limit: 1.0s
Memory limit: 256M

Problem types

METU CClub is preparing a contest area for the final round. The contest area floor is a rectangle \(R\) meters by \(C\) meters. It is divided by \(R \cdot C\) square sections 1 meter by 1 meter each. The organizers have already tiled some of the sections and they are asking you to do the rest.

You have unlimited supply of square tiles with integer side length, i.e. 1x1, 2x2, 3x3... Your task is to use the minimal possible number of tiles needed to finish tiling the contest area. Note that tiles (including ones from the organizers) should not overlap each other and have to cover all the contest area floor.

Input

The first line contains two integers \(R\) and \(C\) separated with a single space. The next \(R\) lines describe the contest area floor. Each of the \(R\) lines contains \(C\) '.' or '#' character. Character '.' denotes a section that should be tiled by you and '#' character denotes the one already tiled by organizers.

Output

The minimum possible number of tiles.

Constraints
  • \(1 ≤ R ≤ 10\)
  • \(1 ≤ C ≤ 10\)
Examples

Input (stdin)

3 3
...
...
...

3 4
....
..#.
....

Output(stdout)

1
8
Notes
  • In the first sample you use only one 3x3 tile.
  • In the second sample you use one 2x2 tile and seven 1x1 tiles.