#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 7, INF = 1e9 + 7;
int n;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> n >> s;
  int ans = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == 'x' && s[i + 1] == 'x' && s[i + 2] == 'x') ++ans;
  }
  cout << ans;
  return 0;
}
