#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int countx = 0, chartoremove = 0;
  string str;
  cin >> str;
  for (int i = 0; i < n; i++) {
    if (str[i] == 'x')
      countx++;
    else
      countx = 0;
    if (countx >= 3) chartoremove++;
  }
  cout << chartoremove << endl;
  return 0;
}
