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