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