#include <bits/stdc++.h>
struct pair_hash {
 public:
  template <class T1, class T2>
  std::size_t operator()(const std::pair<T1, T2>& p) const {
    size_t hash = 5;
    hash += 31 * hash + std::hash<T1>()(p.first);
    hash += 31 * hash + std::hash<T2>()(p.second);
    return hash;
  }
};
int main(const int argc, const char** argv) {
  std::ios::sync_with_stdio(false);
  size_t n;
  std::cin >> n;
  std::string s;
  std::cin >> s;
  size_t counter = 0;
  size_t nowX = 0;
  const size_t X_LIMIT = 3;
  for (char c : s) {
    if (c == 'x') {
      ++nowX;
      if (nowX >= X_LIMIT) {
        ++counter;
      }
    } else {
      nowX = 0;
    }
  }
  std::cout << counter << "\n";
  return 0;
}
