#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<algorithm>
#include<cmath>
#include<queue>
#include<vector>
#include<stack>
using namespace std;

#define REP(i,n) for(int i=0;(i)<(n);(i)++)
#define ll long long

int main() {
	int len;
	string s;
	cin >> len >> s;
	//int len = s.length();

	int a = 0;
	REP(i, len) {
		if (s[i] == 'x') a++;

		if (s[i] == 'o')a = 0;
		if (a == 2) {
			cout << i << endl;
			return 0;
		}
	}

	cout << len << endl;
	return 0;
}