s = input() n = s.count("l")+s.count("o") m = s.count("a")+s.count("s") x = (2**n-1)*(2**m-1) print(x-1 if x and n+m==8 else x)