#include <bits/stdc++.h>
int main(void) {
  int N, a, i = 0, sum = 0;
  char S[200020] = {'\0'};
  scanf("%d", &N);
  scanf("%s", S);
  while (S[i] != '\0') {
    if (S[i] == '#') {
      a = i;
      break;
    }
  }
  for (int j = a; j < N; j++) {
    if (S[j] == '.') {
      sum++;
    }
  }
  printf("%d\n", sum);
  return 0;
}
