#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int cx = 0, cc = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == 'x' && cx < 2)
      ++cx;
    else if (s[i] == 'x' && cx == 2)
      ++cc;
    else if (s[i] != 'x')
      cx = 0;
  }
  cout << cc << endl;
  return 0;
}
