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