#include <bits/stdc++.h>
using namespace std;
long long a, b = 0, c, e;
string s;
signed main() {
  cin >> a >> s;
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == '.') {
      b++;
      e = i;
    }
  }
  c = (s.size() - e + 1) - b;
  if (b == a) {
    cout << 0;
  } else if (s[s.size() - 1] == '.') {
    cout << b;
  } else {
    cout << min(b, c);
  }
}
