load = 1 turn = list(input()) for i in turn: if i: load = [load*2, load*2+1][i == 'R'] print(load)