#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
inline int pt(int a[], int l, int r) {
  int p, i, j;
  p = a[l];
  i = l;
  j = r + 1;
  for (;;) {
    while (a[++i] < p)
      if (i >= r) break;
    while (a[--j] > p)
      if (j <= l) break;
    if (i >= j)
      break;
    else
      swap(a[i], a[j]);
  }
  if (j == l) return j;
  swap(a[l], a[j]);
  return j;
}
inline void q_sort(int a[], int l, int r) {
  int q;
  if (r > l) {
    q = pt(a, l, r);
    q_sort(a, l, q - 1);
    q_sort(a, q + 1, r);
  }
}
inline int readint() {
  int x = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') ch = getchar();
  if (ch == '-') {
    f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n;
string s;
int main() {
  cin >> n >> s;
  int i, j;
  int ans = 0;
  for (i = 0; i < n; i++) {
    if (s[i] == 'x') {
      j = i;
      while (j < n && s[j] == 'x') j++;
      ans += max(0, j - i - 2);
      i = j - 1;
    }
  }
  cout << ans << endl;
  return 0;
}
