#include <bits/stdc++.h>
using namespace std;
bool b[1001];
int main() {
  long long t, l, r, ans1, ans2, n, q, a, mid, tmp1, tmp2;
  long long ans = 0, cnt;
  cin >> n;
  string s;
  cin >> s;
  int i;
  for (i = 0; i < n - 2; i++) {
    if (s[i] == 'x') {
      if (s[i + 1] == 'x' && s[i + 2] == 'x') {
        cnt = 0;
        while (s[i] == 'x' && i < n) {
          cnt++;
          i++;
        }
        ans += (cnt - 2);
        i--;
      }
    }
  }
  cout << ans;
  return 0;
}
