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