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