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