#include <bits/stdc++.h>
int main(void) {
  int N, index, flg, count;
  char S[200000];
  scanf("%d %s", &N, &S);
  printf("N(%d) S(%s)\n", N, S);
  flg = 0;
  count = 0;
  for (index < 0; index < N; ++index) {
    if (flg == 1 && S[index] == '.') {
      count++;
      continue;
    }
    if (S[index] == '#') {
      flg = 1;
    }
  }
  printf("%d\n", count);
  return 0;
}
