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