#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, cnt = 0;
  char shape = '#', dot = '.';
  string S;
  cin >> N >> S;
  for (int i = 0; i < N; i++) {
    if (i > 0) {
      if (S[i - 1] == shape && S[i] == dot) cnt++;
    }
  }
  cout << cnt << endl;
  return 0;
}
