407086: GYM102697 057 Minecraft Prank

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

057. Minecraft Pranktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

You are currently playing minecraft with your friends when you get a brilliant idea for a prank, you want to fill his entire house with sand. Given some information that represents the dimensions of your friend's house return the number of blocks of sand needed to fill it up.

Input

The first line will contain a number that is the height of the house. The next line will be the number of lines that will be used to display the foundation of the house. The following lines will be X's that represent the foundation of the house

Output

Print an integer that is the number of blocks needed to fill the house.

ExampleInput
5
7
XXXX
XXXX
XXXX
XXX
XXXX
XXXX
XXXX
Output
21
Note

The ceiling, floor, and walls are included within the dimensions of the house so be mindful of that. You can also assume the ceiling is flat.

加入题单

上一题 下一题 算法标签: