#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n, ans = 0;
  bool f = false;
  string s;
  cin >> n >> s;
  if (s[0] == '#' && s[1] == '.') ans++;
  for (int i = 2; i < n; i++) {
    if (s[i - 1] == '#' && s[i] == '.') {
      ans++;
      s[i] = '#';
    }
  }
  cout << ans;
}
