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