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