import sys readline=sys.stdin.readline cur=1 for s in readline().rstrip(): cur*=2 if s=="R": cur+=1 print(cur)