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