import Foundation

func main() {
    let s = Array(readLine()!)
    var i = 0
    var res = 0
    
    var j = 1
    for j in 1...3 {
        if s[j-1] == "R"{
            i += 1
        } else {
            if res < i {
                res = i
            }
            i = 0
        }
    }
    
    print(res)
}

main()