import Foundation

main()

func main() {
    guard let s = readLine() else {
        return
    }
    var ans = 0, cnt = 0
    for c in s {
        if (c == "R") {
            cnt += 1
        } else {
            cnt = 0
        }
        ans = max(ans, cnt)
    }
    print(ans)
}
