#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6;
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int N = 2e5 + 100;
char a[N];
int main() {
  int n;
  cin >> n;
  cin >> a;
  int tnt = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] == '.') tnt++;
  }
  cout << min(tnt, n - tnt) << endl;
  return 0;
}
