#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  string S;
  int W = 0, B = 0;
  int HW = 0, HB = 0;
  cin >> N >> S;
  for (int i = 0; i < (N); i++) {
    if (S[i] == '.') {
      W++;
      if (i > N / 2) {
        HW++;
      }
    } else {
      B++;
      if (i > N / 2) {
        HB++;
      }
    }
  }
  if (B < W) {
    if (B < HB) {
      cout << B << endl;
    } else {
      cout << HB + HW << endl;
    }
  } else {
    if (W < HW) {
      cout << W << endl;
    } else {
      cout << HB + HW << endl;
    }
  }
  return 0;
}
