#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  bool flg = false;
  int cnt = 0;
  for (int i = 0; i < s.size(); ++i) {
    if (flg) {
      if (s[i] == '.') cnt++;
    }
    if (s[i] == '#') flg = true;
  }
  if (flg)
    cout << cnt << endl;
  else
    cout << 0 << endl;
}
