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