#include <iostream>
#include <string>
using namespace std;

int main(){
	int n;
	string s;
	char before;
	cin >> n;
	cin >> s;
	std::string str(s);
	int count = 0;
	for(int i = 0; i < n; i++){
		char ss = str[i];
		if(i != 0){
			if(before == 'x' && ss == 'x'){
				break;
			}
		}
		count++;
		before = ss;
	}
	cout << count << endl;
}