1513 数**


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

天上有很多星星,夹在云层间,不知道一共有多少颗,要是能数出来就好了。 给出一幅星空图,是个字符矩阵,*表示星星,#表示云层,让你来数一共有几颗星星…

Input

输入有多组测试数据,每组测试数据第一行是两个整数n,m表示矩阵有n行m列,接下来n行每行是一个由*和#组成的字符串。N=m=0表示结束。

Output

输出一行一个整数,表示有几颗星星…

Sample

Input

3 5
*****
#####
*#*#*
0 0

Output

8

Source: CYZ


Comments

There are no comments at the moment.