#include <bits/stdc++.h>
int main() {
  int a, i, x1 = 0, l;
  scanf("%d", &a);
  char s[a + 1], risou[a + 1];
  int x2 = a;
  scanf("%s", s);
  for (i = 0; i < a; i++) risou[i] = '#';
  for (l = 1; l <= a; l++) {
    risou[l - 1] = '.';
    for (i = 0; i < a; i++)
      if (s[i] != risou[i]) x1++;
    if (x2 > x1) x2 = x1;
    x1 = 0;
  }
  printf("%d", x2);
  return 0;
}
