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