#include "bits/stdc++.h" using namespace std; typedef long long ll; #define rep(i,l,r) for(ll i=(l);i<(r);i++) #define INF (ll)1e18 struct aaa{aaa(){cin.tie(0); ios::sync_with_stdio(0); cout< inline void in(Head&& head,Tail&&... tail){ cin>>head; in(move(tail)...); } template inline void out(T t) { cout< inline void out(Head head,Tail... tail){ cout<>m>>n; rep(i,0,n){ cin>>s; rep(j,0,m)if(s[j]=='W')ans++; } cout<