#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m = 0;
  string s;
  cin >> n >> s;
  for (int i = 0; i < n - 2; i++)
    if (s[i] == 'x' && s[i + 1] == 'x' && s[i + 2] == 'x') m++;
  cout << m;
}
