#include int main (void) { int N, M; int counter = 0; scanf("%d", &N); scanf("%d", &M); char s[N][M]; for (int i = 0; i < N; i++) { for (int j = 0; j < M; j++) { if (s[i][j] = 'W') counter++; } } printf("%d\n", counter); return 0; }