#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  long long n;
  string a;
  cin >> n;
  cin >> a;
  int cur = 0;
  int sum = 0;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == 'x') {
      cur += 1;
    }
    if (a[i] != 'x' || i == a.size() - 1) {
      if (cur >= 3) {
        sum += cur - 2;
      }
      cur = 0;
    }
  }
  cout << sum << endl;
  return 0;
}
