a=1 for i in input():a=a*2+(i=='R') print(a)