#include <bits/stdc++.h>
int main() {
  int n;
  char s[3000000];
  scanf("%d %s", &n, s);
  int black = 0, white = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '.') {
      white++;
    } else {
      black++;
    }
  }
  if (white <= black) {
    printf("%d", white);
  } else {
    printf("%d", black);
  }
}
