while 1:print sum(hash(c+"'E'o")%3for c in`raw_input()`)**2/8