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