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