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