#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char bef = 'a';
  int ans = 0;
  while (n--) {
    char a;
    cin >> a;
    if (bef == '#' && a == '.') {
      bef = '#';
      ans++;
    } else {
      bef = a;
    }
  }
  cout << ans << endl;
}
