#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, k = 0, c = 0, f;
  cin >> t;
  char s[t + 1];
  scanf("%s", &s);
  for (f = 0; f < t - 1; f++)
    if (s[f] == 'x' && s[f + 1] == 'x') {
      for (c = 2; c < t; c++)
        if (s[f + c] == 'x')
          k++;
        else
          break;
      f += c;
    }
  cout << k;
}
