#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  const int Length = 2 * (10 ^ 5);
  char s[Length];
  cin >> n;
  cin >> s;
  int count = 0;
  for (int i = 0; i < n - 1; i++) {
    if (i + 1 == Length) {
      break;
    }
    char c1 = s[i];
    char c2 = s[i + 1];
    if (c1 == '#' && c2 == '.') {
      count++;
    }
  }
  cout << count;
  return 0;
}
