{"problem":{"name":"Futon","description":{"content":"We have a grid with $H$ horizontal rows and $W$ vertical columns of squares, where each square is tidy or untidy. You will now place a mattress on this grid. The mattress can be placed on two horizont","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"hhkb2020_b"},"statements":[{"statement_type":"Markdown","content":"We have a grid with $H$ horizontal rows and $W$ vertical columns of squares, where each square is tidy or untidy.\nYou will now place a mattress on this grid.\nThe mattress can be placed on two horizontally or vertically adjacent tidy squares in the grid.\nGiven are integers $H$, $W$, and $H$ strings $S_i$ of length $W$ each. If the $j$\\-th character of $S_i$ is `.`, the square at the $i$\\-th row from the top and the $j$\\-th column from the left is tidy; if the $j$\\-th character of $S_i$ is `#`, the square at the $i$\\-th row from the top and the $j$\\-th column from the left is untidy.\nFind the number of ways to choose the position for the mattress.\n\n## Constraints\n\n*   $2 \\leq H \\leq 100$\n*   $2 \\leq W \\leq 100$\n*   $S_i$ is a string of length $W$ consisting of `.` and `#`.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$H$ $W$\n$S_1$\n$:$\n$S_H$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"hhkb2020_b","tags":[],"sample_group":[["2 3\n..#\n#..","3\n\nWe have the following three choices:\n\n*   the $1$\\-st and $2$\\-nd squares from the left in the $1$\\-st row from the top;\n*   the $2$\\-nd and $3$\\-rd squares from the left in the $2$\\-nd row from the top; and\n*   the $1$\\-st and $2$\\-nd squares from the top in the $2$\\-nd column the left."],["2 2\n.#\n#.","0"]],"created_at":"2026-03-03 11:01:14"}}