module Main where

import Control.Monad
import Control.Applicative
import Data.List

showingList :: [Int] -> String
showingList (x:[]) = show x
showingList (x:xs) = (show x) ++ " " ++ (showingList xs)

solve :: String -> Int
solve s
    | s == "SSS" = 0
    | s == "SSR" = 1
    | s == "SRS" = 1
    | s == "SRR" = 2
    | s == "RSS" = 1
    | s == "RSR" = 1
    | s == "RRS" = 2
    | otherwise = 3

main :: IO ()
main = do
    s <- getLine
    print $ solve s
