#include <bits/stdc++.h>
using namespace std;
long long n;
void solve() {
  string a;
  cin >> a;
  long long i, ans1 = 0, ans2 = 0, l = a.length();
  for (i = 0; i < l; i++)
    if (a[i] == '.') ans1++;
  cout << min(ans1, l - ans1) << endl;
}
int main() {
  while (cin >> n) solve();
  return 0;
}
