#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 1e9 + 7;
const int base = 1e9;
const int MAX = 1e5;
const double EPS = 1e-9;
const double PI = acos(-1.);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, cnt = 0, res = 0;
  char a;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a == 'x') {
      cnt++;
    } else {
      cnt = 0;
    }
    if (cnt >= 3) res++;
  }
  cout << res;
  return 0;
}
