#include <bits/stdc++.h>
int main() {
  char c;
  int n, count = 0, consecutive = 0;
  std::cin >> n;
  std::cin.get();
  for (int i = 0; i < n; i++) {
    c = std::cin.get();
    if (c == 'x') {
      if (consecutive == 2) {
        count++;
      } else {
        consecutive++;
      }
    } else {
      consecutive = 0;
    }
  }
  std::cout << count;
}
