#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (long long i = 0, max_i = (n); i < max_i; i++)
template <class T>
ostream& operator<<(ostream& s, vector<T>& d) {
    REP(i, d.size()) s << d[i] << (i == d.size() - 1 ? "" : " ");
    return s;
}
using Int = long long;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n;
    string s;
    cin >> n >> s;
    int cnt = 0;
    for (int i = 0; i < n; i++) {
        if (s[i] == 'x') {
            cnt++;
            if (cnt == 2) {
                cout << i << endl;
                return 0;
            }
        } else {
            cnt = 0;
        }
    }
    cout << n << endl;
}

