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