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