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