#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
int main() {
	cin.tie(0); ios::sync_with_stdio(false);
	ll N;
	string S; 
	cin >> N >> S;
	int ans = 0;
	bool f = false;
	for (int i = 0; i < N;i++) {
		if (S[i] == 'o') {
			f = false; ans++;
		}
		else {
			if (f) break;
			f = true; ans++;
		}
	}
	cout << ans << endl;
}