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