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