#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string x;
  cin >> x;
  int ans = 0;
  int p = x.find("xxx");
  while (p > -1) {
    x.erase(p, 1);
    ans++;
    p = x.find("xxx");
  }
  cout << ans << endl;
  return 0;
}
