rout=input() count=1 #print(rout[0]) for i in rout: if i=="R": count=2*count+1 elif i=="L": count=2*count print(count)