#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using namespace std;
const ll mod = 1e9 + 7;
int main() {
  ll n, w = 0, b = 0;
  cin >> n;
  string s;
  cin >> s;
  for (ll i = ll(0); i < ll(s.length()); i++) {
    if (s[i] == '.')
      w++;
    else
      b++;
  }
  cout << min(w, b);
}
