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