#include <bits/stdc++.h>
template <class T>
struct ptr_min {
  bool operator()(T* a, T* b) { return *a < *b; }
};
template <class T>
struct ptr_max {
  bool operator()(T* a, T* b) { return *a > *b; }
};
int _X, _FLAG, _CH;
inline int read_int() {
  _X = 0;
  _FLAG = 1;
  _CH = getchar();
  while (_CH < '0' || _CH > '9') {
    if (_CH == '-') _FLAG = -1;
    _CH = getchar();
  }
  while (_CH >= '0' && _CH <= '9') {
    _X = _X * 10 + _CH - '0';
    _CH = getchar();
  }
  return _X * _FLAG;
}
inline long long read_ll() {
  long long x = 0, flag = 1;
  _CH = getchar();
  while (_CH < '0' || _CH > '9') {
    if (_CH == '-') flag = -1;
    _CH = getchar();
  }
  while (_CH >= '0' && _CH <= '9') {
    x = x * 10 + _CH - '0';
    _CH = getchar();
  }
  return x * flag;
}
template <typename T>
inline const T GCD(T a, T b) {
  T c;
  while (a != 0) {
    c = a;
    a = b % a;
    b = c;
  }
  return b;
}
inline const unsigned long long binom(unsigned long long n,
                                      unsigned long long k) {
  if (k > n) return 0;
  unsigned long long C = 1;
  for (unsigned long long i = 1; i <= k; ++i) C = (C * (n - i + 1)) / i;
  return C;
}
template <typename T, typename K>
inline const T stepen(T a, K x, T mod) {
  T res = 1;
  while (x) {
    if (x & 1) {
      res *= a;
      res %= mod;
    }
    a *= a;
    a %= mod;
    x /= 2;
  }
  return res;
}
template <typename T, typename K>
inline const T stepen(T a, K x) {
  T res = 1;
  while (x) {
    if (x & 1) res *= a;
    a *= a;
    x /= 2;
  }
  return res;
}
template <typename T, typename K>
inline const T mod_div(const T lhs, const T rhs, const K mod) {
  return (lhs * stepen(rhs, mod - 2, mod)) % mod;
}
long long n, m, k, t;
char flag[120];
int main() {
  std::cin >> n >> flag;
  for (int i = 0; i < n - 2; ++i) {
    if (flag[i] == 'x' && flag[i] == flag[i + 1] && flag[i] == flag[i + 2]) ++m;
  }
  std::cout << m;
  return 0;
}
