#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  string S;
  cin >> N >> S;
  bool found = false;
  int count = 0;
  for (int i = 0; i < S.length(); i++) {
    if (!found) {
      if (S[i] == '#') {
        found = true;
      }
    } else {
      if (S[i] == '.') {
        count++;
      }
    }
  }
  cout << count << endl;
  return 0;
}
