S = input() a = 1 for c in S: if c == 'L': a = a * 2 elif c == 'R': a = a * 2 + 1 print(a)