#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
char s[maxn];
int main() {
  int n;
  scanf("%d\n", &n);
  int ret = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%c", &s[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (s[i] == '.' && s[i - 1] == '#') {
      ret++;
    }
  }
  printf("%d\n", ret);
}
