#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, minn = 500000, num = 0;
  string s;
  bool jud = false;
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    if (jud == false) {
      if (s[i] == '#') {
        jud = true;
      }
    } else {
      if (s[i] == '.') num++;
    }
  }
  cout << num << "\n";
  return 0;
}
