#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  string S;
  cin >> N;
  cin >> S;
  char a = '#';
  char b = '.';
  int c = -1;
  int count = 0;
  for (int i = 0; i < N; i++) {
    if (S.at(i) == a) {
      c = i;
      break;
    }
  }
  if (c == -1) {
    cout << "0" << endl;
    return 0;
  }
  string Str = S.substr(c);
  for (int i = 0; i < N - c; i++) {
    if (Str.at(i) == b) {
      count++;
    }
  }
  cout << count << endl;
}
