      PROGRAM piyo
      IMPLICIT NONE
      INTEGER,PARAMETER :: p = 16
      character(3) :: s
      integer(p) :: i,ans,temp
      
      read*,s
      
      ans = 0
      temp = 0
      do i = 1,3
        if( s(i:i)=='R' )then
          temp = temp + 1
          ans = max(temp,ans)
        else
          temp = 0
        end if
      end do
      
      print*,ans
      
      
      
      stop
      !debugg
      
      
      
      END PROGRAM