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