#include <bits/stdc++.h>
using namespace std;
int n, ans;
char a[109];
int main() {
  cin >> n >> a + 1;
  int len = strlen(a + 1), l = 1;
  while (l <= len) {
    if (a[l] == 'x') {
      int res = 0;
      for (int i = l; i <= len; i++) {
        if (a[i] != 'x') break;
        res++;
      }
      ans += max(0, res - 2);
      l = l + res;
    } else
      l++;
  }
  cout << ans << endl;
  return 0;
}
