N = int(input())
S = input()
ans = 0
flag = False
for i in range(len(S)):
    if(S[i] == 'o'):
        ans += 1
        flag = False
    else:
        if(flag):
            break
        else:
            ans += 1
            flag = True
print(ans)
