S = input() n = 1 for s in S: n *= 2 if s=="R": n += 1 print(n)