try: S = raw_input() except EOFError as e: print 1 else: now = 1 for i in range(0, len(S)): now *= 2 if S[i] == 'R': now += 1 print now