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