print("input route(LorR)") S = list(input()) route = 1 direction = 0 for i in S: if i == "L": direction = 0 elif i == "R": direction = 1 else: print("something is wrong") route = route * 2 + direction print(route)