#include <bits/stdc++.h>
using namespace std;
int main() {
  string filename;
  int n, total = 0;
  cin >> n;
  cin >> filename;
  size_t start = 0;
  while (true) {
    size_t end = filename.find("xxx", start);
    if (end != string::npos) {
      total++;
    }
    if (end == string::npos) break;
    start = end + 1;
  }
  cout << total << endl;
}
