eolymp
bolt
Try our new interface for solving problems
Problems

Area of the room

Area of the room

Find the area of the room in the square labyrinth.

Input

The first line contains the size n (3n10) of labyrinth. Each of the next n lines contains n characters describing the labyrinth (symbol "." denotes the empty cell, symbol "*" denotes the wall). The last line contains two numbers - the row and column numbers for the cell that locates in the room which area should be found. It is guaranteed that this cell is empty and the labyrinth is surrounded by walls from all sides. The rows and columns of the labyrinth are numbered starting from one.

Output

Print the number of empty cells in a given room.

prb4001.gif

Time limit 1 second
Memory limit 128 MiB
Input example #1
5
*****
**..*
*.*.*
*..**
*****
2 4
Output example #1
3