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