import java.util.Scanner;

fun main (args : Array<String>) {
  val input = Scanner(System.`in`)
  
  while (input.hasNext()) {
    val S = input.next()
    var maxRainyDay = 0
    var currRainyDay = 0
    
    for (c in S) {
      if (c == 'R') {
        ++currRainyDay
      } else {
        maxRainyDay = Math.max(currRainyDay, maxRainyDay)
        currRainyDay = 0
      }
    }
    
    maxRainyDay = Math.max(currRainyDay, maxRainyDay)
    
    println(maxRainyDay)
  }
}