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