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