import Control.Applicative ((<$>)) import Data.List main :: IO () main = do solve <$> getLine >>= print solve :: String -> Int solve = foldl' f 1 where f v c = if c == 'L' then 2 * v else 2 * v + 1