#include <bits/stdc++.h>
using namespace std;
char s1[5000454];
int main() {
  int i, b, c, a, test;
  cin >> test;
  getchar();
  cin >> s1;
  a = strlen(s1);
  int s = 0;
  c = 0;
  for (i = 0; i <= a; i++) {
    if (s1[i] == 'x')
      c++;
    else {
      if (c > 2) s = s + (c - 2);
      c = 0;
    }
  }
  cout << s << endl;
  return 0;
}
