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