#include <bits/stdc++.h>
using namespace std;
int n, k;
char s[200009];
int main() {
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == '.')
      continue;
    else if (s[i + 1] == '.') {
      k++;
      s[i + 1] = '#';
    }
  }
  cout << k;
}
