x = list(input()) road = 1 if len(x) != 0: for i in x: if i == 'L': road *= 2 elif i == 'R': road *= 2 road += 1 print(road)