#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  string s;
  cin >> N;
  cin >> s;
  int a, b = 0;
  for (int i = 0; i < N; i++) {
    if (s[i] == '.') {
      a++;
    } else {
      b++;
    }
  }
  if (a == N || b == N) {
    cout << 0 << endl;
  } else if (a >= b) {
    cout << a << endl;
  } else {
    cout << b << endl;
  }
  return 0;
}
