x = gets
ans = 0
o = ''
l = 0
x.each_char do |c|
    if c == 'R'
        if o == 'R'
            l += 1
        else
            l = 1
        end
    else
        l = 0
    end
    o = c
    ans = [ans,l].max
end
p ans
