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