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