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