#include <bits/stdc++.h>
using namespace std;
int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
int main() {
  long long n;
  cin >> n;
  string s;
  cin >> s;
  long long w = 0;
  long long b = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '.')
      ++w;
    else
      ++b;
  }
  cout << min(w, b) << endl;
}
