while 1: w=raw_input().lower() print len(w)<5 and -1 or len(w)-(w[0]=='l')-(w[1]=='i')-w[2:-2].count('n')-(w[-2]=='u')-(w[-1]=='x')