#include <bits/stdc++.h>
using namespace std;
int n, cnt, tmp;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  while (n--) {
    char c;
    cin >> c;
    if (c == 'x') {
      if (tmp == 2)
        cnt++;
      else
        tmp++;
    } else
      tmp = 0;
  }
  cout << cnt << '\n';
}
