#include <bits/stdc++.h>
int main() {
  int n, ans;
  char a[100000], last;
  scanf("%d", &n);
  scanf("%s", a);
  last = a[0];
  ans = n;
  for (int i = 1; i < n; i++) {
    if (a[i] == 'x' && last == 'x') ans--;
    last = a[i];
  }
  printf("%d\n", ans);
}
