-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU s = io.read() x = 1 for c in s:gmatch('.') do if c == 'L' then x = x * 2 else x = (x * 2) + 1 end end print(x)