#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int c = 0, f = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'x')
      c++;
    else if (s[i] != 'x' && c < 3)
      c = 0;
    if (c > 2) {
      while (1) {
        f++;
        c--;
        if (c < 3) break;
      }
    }
  }
  cout << f;
}
