{"raw_statement":[{"iden":"problem statement","content":"There is a grid with $H$ horizontal rows and $W$ vertical columns. Let $(i,j)$ denote the square at the $i$\\-th row from the top and the $j$\\-th column from the left.  \nFind the number of squares that share a side with Square $(R, C)$.\nHere, two squares $(a,b)$ and $(c,d)$ are said to share a side if and only if $|a-c|+|b-d|=1$ (where $|x|$ denotes the absolute value of $x$)."},{"iden":"constraints","content":"*   All values in input are integers.\n*   $1 \\le R \\le H \\le 10$\n*   $1 \\le C \\le W \\le 10$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$H$ $W$\n$R$ $C$"},{"iden":"sample input 1","content":"3 4\n2 2"},{"iden":"sample output 1","content":"4\n\nWe will describe Sample Inputs/Outputs $1,2$, and $3$ at once below Sample Output $3$."},{"iden":"sample input 2","content":"3 4\n1 3"},{"iden":"sample output 2","content":"3"},{"iden":"sample input 3","content":"3 4\n3 4"},{"iden":"sample output 3","content":"2\n\nWhen $H=3$ and $W=4$, the grid looks as follows.\n\n*   For Sample Input $1$, there are $4$ squares adjacent to Square $(2,2)$.\n*   For Sample Input $2$, there are $3$ squares adjacent to Square $(1,3)$.\n*   For Sample Input $3$, there are $2$ squares adjacent to Square $(3,4)$.\n\n![image](https://img.atcoder.jp/abc250/abc250a-fig1.png)"},{"iden":"sample input 4","content":"1 10\n1 5"},{"iden":"sample output 4","content":"2"},{"iden":"sample input 5","content":"8 1\n8 1"},{"iden":"sample output 5","content":"1"},{"iden":"sample input 6","content":"1 1\n1 1"},{"iden":"sample output 6","content":"0"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}