#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int x = 0, ans = 0;
  for (int i = 0; i < n; ++i) {
    if (x >= 3) ++ans;
    if (s[i] == 'x') {
      ++x;
    } else {
      x = 0;
    }
  }
  if (x >= 3) ++ans;
  cout << ans << '\n';
  return 0;
}
