#include <bits/stdc++.h>
using namespace std;
int main() {
  long long q, m = 0, n = 0, y;
  string a;
  cin >> q >> a;
  for (y = 0; y <= a.length(); y++) {
    if (y == a.length()) {
      if (m >= 3) n += m - 2;
      break;
    }
    if (a[y] == 'x') {
      m++;
    } else {
      if (m >= 3) n += m - 2;
      m = 0;
    }
  }
  cout << n << endl;
  return 0;
}
