#include <bits/stdc++.h>
using namespace std;
int b, ans = 0, n;
int main() {
  string a;
  cin >> n >> a;
  for (int i = 0; i < a.size(); ++i) {
    if (a[i] == 'x') {
      b++;
    } else {
      b = 0;
    }
    if (b > 2) {
      ans++;
    }
  }
  cout << ans;
}
