n=1 for c in input():n=2*n+(c>'L') print(n)