#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5;
void solve() {
  int n;
  cin >> n;
  string s, c;
  cin >> s;
  c = "xxx";
  int ans = 0;
  int i = 0;
  while (i < n) {
    if (s.find(c, i) != string::npos && (s.find(c, i) == i)) {
      ans++;
    }
    i++;
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
