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