#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, q;
  string s;
  cin >> n >> s;
  q = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'x') {
      int r = 1;
      for (int j = i + 1; j < n; j++) {
        if (s[j] == 'x')
          r++;
        else
          break;
        if (r == 3) {
          q++;
          break;
        }
      }
    }
  }
  cout << q;
  return 0;
}
