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