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