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