#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ans = 0;
  cin >> n;
  string s;
  cin >> s;
  string sample = "xxx";
  for (int i = 0; i < n - 2; i++) {
    if (s[i] == sample[0] && s[i + 1] == sample[1] && s[i + 2] == sample[2]) {
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
