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