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