
Imports System.Console
Module Module1
    Dim ans As Integer
    Dim n, k As Integer
    Sub Main()
        Dim s As String = ReadLine()
        Dim c() As Char = s.ToCharArray
        Dim max As Integer
        Dim ren As Integer
        For i = 0 To c.Length - 1
            If c(i) = "S" Then
                ren += 1
            Else
                If ren >= max Then
                    max = ren
                End If
                ren = 0
            End If
        Next
        If ren >= max Then
            max = ren
        End If
        ren = 0
        WriteLine(max)
        ReadLine()
    End Sub
End Module
