#include <bits/stdc++.h>
using namespace std;
string S;
int main() {
  int n = 0, iCounter = 0, iCnt = 0;
  cin >> n;
  cin >> S;
  for (int i = 0; i < n; i++) {
    if (S[i] == 'x')
      iCounter++;
    else
      iCounter = 0;
    if (iCounter == 3) {
      iCnt++;
      iCounter--;
    }
  }
  cout << iCnt << "\n";
  return 0;
}
