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