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