S = input() x = 1 for c in S: match c: case 'L': x = 2 * x case 'R': x = 2 * x + 1 print(x)