#include <bits/stdc++.h>
using namespace std;
int main() {
  char stn;
  int N, ans = 0;
  cin >> N;
  while (cin >> stn) {
    if (stn == '#') {
      while (cin >> stn) {
        if (stn == '.') ans++;
      }
    }
  }
  cout << ans << endl;
}
