#include <bits/stdc++.h>
using namespace std;
int sh = 0, d = 0;
int main() {
  long N;
  cin >> N;
  string s;
  cin >> s;
  for (int i = 0; i < N; i++) {
    if (s.at(i) == '.')
      d++;
    else
      sh++;
  }
  cout << min(d, sh) << endl;
}
