/**********
author:chanjun2016
email:15755396353@163.com
***********/
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <algorithm>
using namespace std;
#define INF = 0x3f3f3f3f
int main(){
int h,w;
while (~scanf("%d%d",&h,&w)){
int cnt = 0;
double ans = 0;
char ch;
for (int i = 0; i < h; ++i){
for (int j = 0; j < w; ++j){
while (ch = getchar(),ch != '.' && ch != '/' && ch != '\\');
if (ch != '.'){
++cnt;
ans += 0.5;
}else{
if (cnt & 1){
ans += 1;
}
}
}
}
printf("%.0lf\n",ans);
}
return 0;
}
uva 1641
最新推荐文章于 2018-08-28 18:31:41 发布