#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  string s;
  cin >> s;
  long long l = s.size();
  long long c = 0, final = 0;
  for (long long i = 0; i < l; i++) {
    if (s[i] == 'x')
      c++;
    else {
      if (c > 2) final += c - 2;
      c = 0;
    }
  }
  if (c > 2) final += c - 2;
  cout << final;
}
