{"raw_statement":[{"iden":"problem statement","content":"We have a grid of $H$ horizontal rows and $W$ vertical columns, where some of the squares contain obstacles.  \nLet $(i, j)$ denote the square at the $i$\\-th row from the top and $j$\\-th column from the left.  \nYou are given $H$ strings $S_1, S_2, S_3, \\dots, S_H$. The $j$\\-th character of $S_i$ describes the square $(i, j)$; `#` means the square contains an obstacle, and `.` means it does not.  \nWe say a square is **visible** from another when it is on the same row or the same column, and there is no obstacle between them (including themselves).  \nPrint the number of squares **visible** from the square $(X, Y)$ (including $(X, Y)$ itself)."},{"iden":"constraints","content":"*   $1 \\le H \\le 100$\n*   $1 \\le W \\le 100$\n*   $1 \\le X \\le H$\n*   $1 \\le Y \\le W$\n*   $S_i$ is a string of length $W$ consisting of `.` and `#`.\n*   The square $(X, Y)$ does not contain an obstacle."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$H$ $W$ $X$ $Y$\n$S_1$\n$S_2$\n$S_3$\n$\\hspace{3pt} \\vdots$\n$S_H$"},{"iden":"sample input 1","content":"4 4 2 2\n##..\n...#\n#.#.\n.#.#"},{"iden":"sample output 1","content":"4\n\nThe squares visible from the square $(2, 2)$ are:\n\n*   $(2, 1)$\n*   $(2, 2)$\n*   $(2, 3)$\n*   $(3, 2)$"},{"iden":"sample input 2","content":"3 5 1 4\n#....\n#####\n....#"},{"iden":"sample output 2","content":"4\n\nEven if two squares are on the same row or the same column, they are not visible from each other when there are obstacles between them."},{"iden":"sample input 3","content":"5 5 4 2\n.#..#\n#.###\n##...\n#..#.\n#.###"},{"iden":"sample output 3","content":"3"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}