n = 1 for c in input(): n *= 2 if c == 'R': n += 1 print(n)