Module Module1
Sub main()
Dim S = Console.ReadLine()
If S = "RRR" Then
    Console.Write (3)
ElseIf S = "SSS" Then
    Console.Write (0)
    ElseIf S = "SRR" Or S = "RRS" Then
Console.Write (2)
Else
Console.Write (1)
End If


End Sub
End module

