#include <bits/stdc++.h>
using namespace std;
const int maxn = 100;
char s[maxn] = {0};
int k, n;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  cin >> s;
  int ans = 0;
  if (n == 1) {
    cout << 0 << endl;
    return 0;
  }
  for (int i = 0; i < strlen(s) - 1; i++) {
    if (s[i] == '#' && s[i + 1] == '.') {
      ans++;
    }
  }
  cout << ans << "\n";
  return 0;
}
