local S = io.read("l")

local R = string.byte("R")

local max = 0
local count = 0
for i = 1, 3 do
	if S:byte(i) == R then
		count = count + 1
		max = (max < count) and count or max
	else
		count = 0
	end
end

print(max)