#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  string S;
  cin >> N >> S;
  int ans = 0;
  for (int i = 0; i < (int)(N - 1); i++) {
    if (S[i] == '.')
      continue;
    else {
      if (S[i + 1] == '.') ans++;
    }
  }
  cout << ans << endl;
}
