#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, bf = 0, c = 0;
  string s;
  cin >> n >> s;
  for (int i = 0; i < s.size(); i++) {
    if (bf == 1) {
      if (s[i] == '.') {
        c++;
      } else {
        bf = 0;
      }
    }
    if (s[i] == '#') {
      bf = 1;
    }
  }
  cout << c << endl;
  return 0;
}
