#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count = 0, moves = 0;
  cin >> n;
  string filename;
  cin >> filename;
  filename = filename + "#";
  for (int i = 0; i < n + 1; i++) {
    if (filename[i] != 'x') {
      if (count >= 3) {
        moves = moves + (count - 2);
      }
      count = 0;
      continue;
    }
    count++;
  }
  cout << moves;
  return 0;
}
