An oil company is responsible for the exploration of the oil content under a block of land, which is a moment-line, and is cut into many small pieces for the convenience of exploration. Then use the instrument to explore each small piece. A small piece of oil is called a pocket. If two pocket is connected, the two pocket is the same oil deposit. (The so-called connected definitions are the same as those in the mine game, please refer to sample input,sample output)
Your task is to find out how many different oil deposit the land contains.
Input
The input contains several sets of data, and the first row of each group of data has 2 integer m,n. M represents the number of columns in this plot, and N represents the number of rows in this plot. (1<=m,n<=100), the next M-line is the content of this piece of land exploration. ' @ ' stands for this small piece of oil, ' * ' on behalf of this small block contains no oil. M=0 N=0 represents the end of the input.
Output
The number of oil deposit output for each set of test data.
Sample input
1 1
*
3 5
*@*@*
**@**
*@*@*
1 8
@@****@*
5 5
****@
*@@*@
*@**@
@@@*@
@@**@
0 0
Sample Output
0
1
2
2
6_12 Oilfield (UVa572) < graph of Connected block dfs>