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