S = input() now = 1 for s in S: if s=="L": now *= 2 else: now *= 2 now += 1 print(now)