#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
template <class T, class S>
void cmin(T &a, const S &b) {
  if (a > b) a = b;
}
template <class T, class S>
void cmax(T &a, const S &b) {
  if (a < b) a = b;
}
using namespace std;
signed main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (i) {
      if (s[i] == s[i - 1] && s[i] == 'x') break;
      ans++;
    }
  }
  cout << ans << endl;
}
