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