pass = gets.split("") numeral = pass.count("l") + pass.count("o") mark = pass.count("a") + pass.count("s") except = numeral+mark==8 ? 1 : 0 if numeral == 0 || mark == 0 then puts 0 else puts (2**numeral-1)*(2**mark-1)-except end