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