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