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