#include <iostream>
#include <string>

using namespace std;

int solve(int n, string str)
{
    int counter = 0;
    bool flag = false;
    for(int i = 0; i < n; i+=1) {
        if (str[i] == 'o') {
            counter += 1;
            flag = false;
            continue;
        }

        if (flag) {
            return counter;
        }
        counter += 1;
        flag = true;
    }
    return counter;
}

int main()
{
    int n;
    string str;
    cin >> n >> str;

    cout << solve(n, str) << endl;
    return 0;
}
