#include <bits/stdc++.h>
#define ll long long
using namespace std;



int main(int argc, char**argv) {
ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
int n; cin >> n;
int m; cin >> m;
char matrica[n][m];
int br = 0;
for ( int i = 0; i < n; i++ ){
    for ( int j = 0; j < m; j++ ){
        cin >> matrica[i][j];
        if ( matrica[i][j] == "*" ){
            br++;
        }
    }
}
cout << n * m - br;
return 0;
}