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