S = input() a = S.count("l") + S.count("o") b = S.count("a") + S.count("s") if a > 0 and b > 0: if a + b == 8: print((2 ** a - 1) * (2 ** b - 1) - 1) else: print((2 ** a - 1) * (2 ** b - 1)) else: print(0)