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