import java.util.Scanner

fun main() {
	val scn = Scanner(System.`in`)
	val s = scn.next()
	var max = 0
	var cnt = 0
	for (c in s){
		when(c) {
			'S' -> cnt = 0
			'R' -> {
				cnt++
				max = kotlin.math.max(max, cnt)
			}
		}
	}
	println(max)
}
