object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val s = sc.next()
  if (s == "RRR") {
    println(3)
  } else if (s.count(_ == 'R') == 2 && s(1) == 'R') {
    println(2)
  } else if (s.contains('R')) {
    println(1)
  } else {
    println(0)
  }
}
