**Time limit:**1.00 s**Memory limit:**512 MB

How many possible ways are there to place the queens?

**Input**

The input has eight lines, and each of them has eight characters. Each square is either free (

`.`

) or reserved (`*`

).**Output**

Print one integer: the number of ways you can place the queens.

**Example**

Input:

`........`

........

..*.....

........

........

.....**.

...*....

........

Output:

`65`