#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  string s;
  cin >> N >> s;
  char tmp = '.';
  int ans = 0;
  for (int i = 0; i < N; i++) {
    if (s[i] == '.' && tmp == '#') {
      ans++;
    }
    tmp = s[i];
  }
  cout << ans << endl;
}
