#include #include int main(){ int N, M; char A[51]; int i, j, count; scanf("%d %d", &N, &M); count = N * M; for(i = 0; i < N; i++){ scanf("%s", A); for(j = 0; j < strlen(A); j++){ if(A[j] == 'R') count--; } } printf("%d\n", count); return 0; }