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