main ::IO()
main = do
    v<-getLine
    print $ solver v



solver::String -> Int
solver str = 
    if elem str r0 then 0 else if
        elem str r1 then 1 else if 
        elem str r2 then 2 else 3 

    
r0::[String]
r0 = ["SSS"]

r1::[String] 
r1 = ["RSS","SRS","SSR"]

r2::[String]
r2 = ["RRS","RSR","SRR"]

r3::[String]
r3 = ["RRR"]