object Main extends App {
  
  val sc = new java.util.Scanner(System.in)
  val s = sc.next()
  var ans = 0
  for ((a, i) <- s.zipWithIndex) {
    if (a == 'R' && (i ==  0 || ans == 0 || s(i - 1) == 'R')) {
      ans += 1
    }
  }
  println(ans)
}