main::IO()
main = do 
    [a,b,c] <- getLine
    print $ raindays a b c
    
raindays a b c
    |(a=='R')&&(b=='R')&&(c=='R') = 3
    |((a=='R')&&(b=='R'))||((b=='R')&&(c=='R')) = 2
    |(a=='R')||(b=='R')||(c=='R') = 1
    |otherwise = 0