import Data.Char import Data.List import Numeric fromStringToBit :: String -> Int fromStringToBit s = if s == "" then 0 else fst $ head $ readInt 2 (`elem` "01") digitToInt t where t = map (\x -> if x == 'L' then '0' else '1') s main :: IO () main = do s <- getLine if s == "" then print 1 else print $ 2 ^ (length s) + (fromStringToBit s)