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