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