Imports System

Module Program
    Sub Main(args As String())

        Dim S As String = Console.ReadLine()

        Dim ans As Integer = 0

        If InStr(S, "RRR") > 0 Then
            ans = 3
        ElseIf InStr(S, "RR") > 0 Then
            ans = 2
        ElseIf InStr(S, "R") > 0 Then
            ans = 1
        End If

        Console.WriteLine(ans)

    End Sub
End Module
