S = list(input()) K = 1 for i in S: if i == 'L': K = K * 2 elif i == 'R': K = K * 2 + 1 print(K)