#include <bits/stdc++.h>
int main() {
  int N = 0;
  int i = 0;
  int length = 0;
  int count1 = 0;
  int count2 = 0;
  char *str;
  str = (char *)malloc(200000 + 1);
  if (str == NULL) {
    return -1;
  }
  scanf("%d", &N);
  scanf("%s", str);
  for (i = 0; i < N; i++) {
    if (str[i] == '#') {
      length = i;
      break;
    }
  }
  for (i = length; i < N; i++) {
    if (str[i] == '.') {
      count1++;
    } else {
      count2++;
    }
  }
  printf("%d\n", count1);
  return 0;
}
