func main() {
    let s = readLine()!
    var maxCount = 0
    var count = 0
    for character in s {
        if character == "R" {
            count += 1
            if maxCount <= count {
                maxCount = count
            }
        } else {
            count = 0
        }
    }
    print(maxCount)
}

main()
