#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  char s[1001];
  cin >> n >> s;
  m = 0;
  for (int i = 0; i < n - 2; i++) {
    if (s[i] == 'x' && s[i + 1] == 'x' && s[i + 2] == 'x') {
      m++;
    }
  }
  cout << m << endl;
  return 0;
}
