#include <bits/stdc++.h>
int main() {
  int n, count = 0, x = 0, i = 0;
  scanf("%d", &n);
  char ch, str[n + 1];
  ch = getchar();
  gets(str);
  for (i = 0; i < n; i++) {
    if (str[i] == 'x' && str[i + 1] == 'x') x++;
    if (str[i] == 'x' && str[i + 1] != 'x' && x != 0) {
      count = count + x - 1;
      x = 0;
    }
  }
  printf("%d\n", count);
  return 0;
}
