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