#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int count = 0;
  int n;
  cin >> n;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == '.') {
      if (s[i - 1] == '#') {
        count++;
      } else {
        continue;
      }
    }
  }
  cout << count;
}
