#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int i, nr = 0;
  char a, b, c;
  cin >> a >> b;
  for (i = 2; i < n; ++i) {
    cin >> c;
    if (c == 'x' && a == b && b == c)
      nr++;
    else {
      a = b;
      b = c;
    }
  }
  cout << nr << endl;
  return 0;
}
