import Foundation

func main() {
    guard let line = readLine() else { return }
    //let inputs = line.components(separatedBy: " ").compactMap() { Int($0) }
    var inputs = [String]()
    for a in line {
        inputs.append(String(a))
    }
    var count = 0
    if inputs[1] == "R" {
        count += 1
        if inputs[0] == "R" {
            count += 1
            if inputs[2] == "R" {
                count += 1
            }
        }
    } else {
        if inputs[0] == "R" || inputs[2] == "R" {
            count += 1
        }
    }
    print(count)
}
main()
