#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, start;
  string S;
  cin >> N >> S;
  bool end = true;
  start = 0;
  for (int i = 0; i < 3; i++) {
    if (S[i] == '.') {
      continue;
    }
    start = i;
    end = false;
    break;
  }
  if (end) {
    cout << 0 << endl;
    return 0;
  }
  int answer = 0;
  for (int i = start + 1; i < N; i++) {
    if (S[i] == '.') {
      S[i] = '#';
      answer++;
    }
  }
  cout << answer << endl;
}
