kk=input()
if 'NiuNiu' in kk:
    print(kk.index('NiuNiu'))
else:
    print(-1)