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