import Control.Applicative
import Data.List

main :: IO ()
main = solve <$> getLine >>= print

solve :: String -> Int
solve = f . filter ((=='R') . (head)). group
  where
    f [] = 0
    f (x:_) = length x
