#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  string s;
  long long counter = 0;
  cin >> n >> s;
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == 'x' and s[i + 1] == 'x' and s[i + 2] == 'x') counter++;
  }
  cout << counter << '\n';
}
int32_t main() {
  long long testcases = 1;
  while (testcases--) {
    solve();
  }
  return 0;
}
