#include <bits/stdc++.h>
int main(void) {
  int N, i, black, white;
  char *S;
  scanf("%d", &N);
  S = (char *)malloc(sizeof(char) * (N + 1));
  assert(S);
  for (i = 0, black = 0, white = 0; i < N; i++) {
    if (S[i] == '.') {
      white += 1;
    } else {
      black += 1;
    }
  }
  if (black < white) {
    printf("%d", black);
  } else {
    printf("%d", white);
  }
  free(S);
  return 0;
}
