#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char str[200001];
  int sum = 0;
  cin >> n;
  scanf("%s", str);
  for (int i = 0; i <= n - 1; i++) {
    if (str[i] == '#' && str[i + 1] == '.') {
      sum += 1;
    }
  }
  cout << sum << endl;
  return 0;
}
