#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, count = 0;
  cin >> n;
  char s[n];
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == '#' && s[i + 1] == '.') count++;
  }
  cout << count << endl;
}
