#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string str;
  cin >> n;
  cin >> str;
  int ans = 0, sum = 0;
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == 'x') {
      sum++;
    } else {
      if (sum >= 3) {
        ans += sum - 2;
      }
      sum = 0;
    }
  }
  if (sum >= 3) {
    ans += sum - 2;
  }
  cout << ans << endl;
  return 0;
}
