import sequtils,strutils var S = stdin.readline n = 1 for c in S: if c == 'L': n *= 2 else: n = n * 2 + 1 echo n