#include <bits/stdc++.h>
const int c = 2 * 10e5;
const double pi = 3.14159265358979323846;
using namespace std;
int main() {
  int n;
  cin >> n;
  string second;
  cin >> second;
  int streak = 0;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (second[i] == 'x') {
      streak++;
    } else {
      streak = 0;
    }
    if (streak >= 3) {
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
