#include <bits/stdc++.h>
int main() {
  int x, k = 0;
  char s[3] = "";
  scanf("%d", &x);
  while (x + 2) {
    if (s[0] == 'x' && s[1] == 'x' && s[2] == 'x') k++;
    s[0] = s[1];
    s[1] = s[2];
    scanf("%c", &s[2]);
    x--;
  }
  printf("%d\n", k);
  return 0;
}
