#include <bits/stdc++.h>
using namespace std;
int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
int main() {
  long long N;
  cin >> N;
  string S;
  cin >> S;
  int cb = 0;
  int cw = 0;
  for (int i = 0; i < N; i++) {
    if (S[i] == '#') {
      cb++;
    } else {
      cw++;
    }
  }
  int ans = (cb > cw) ? cw : cb;
  cout << ans << endl;
}
