#include <bits/stdc++.h>
using namespace std;
int main() {
  int x;
  cin >> x;
  string str;
  cin >> str;
  int counter = 0, total = 0;
  for (int i = 0; i < x; ++i) {
    if (str[i] == 'x') {
      counter++;
    }
    if (str[i] != 'x' || i == str.size() - 1) {
      if (counter >= 3) total += counter - 2;
      counter = 0;
    }
  }
  cout << total;
}
