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