I. Conflagration
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

On a field of size $$$n \times n$$$, there is a chess knight. Some cells in the field have caught fire. The fire spreads to neighboring cells at the end of each knight's move, and if the knight is caught by the fire, it will burn. The fire cannot spread beyond the field boundaries, while the knight can escape.

Your task is to determine the number of starting positions for the knight from which it can escape the fire moving outside of the field boundaries.

Input

The first line contains an integer $$$n$$$ ($$$1 \leq n \leq 500$$$).

Each of the following $$$n$$$ lines contains $$$n$$$ characters representing the initial state of the field. "#" indicates fire, while "." indicates an empty cell.

Output

Output a single integer — the number of cells starting from which the knight can escape from the fire.

Example
Input
6
######
####..
...#..
.##...
######
######
Output
10
Note

A chess knight moves two squares horizontally and then one square vertically, or one square horizontally and then two squares vertically.