
flag = True
count = 0
l = []

for s in input():
    if flag:
        if s == "R":
            count += 1
            l.append(count)
        else:
            l.append(0)
            count = 0


print(max(l)) flag = True flag True count = 0 count 0 l = [] l [] for s in input():
    if flag:
        if s == "R":
            count += 1
            l.append(count)
        else:
            l.append(0)
            count = 0 s input() input if flag:
        if s == "R":
            count += 1
            l.append(count)
        else:
            l.append(0)
            count = 0 flag if s == "R":
            count += 1
            l.append(count)
        else:
            l.append(0)
            count = 0 s == "R" s "R" count += 1 count 1 l.append(count) l.append l append count l.append(0) l.append l append 0 count = 0 count 0 print(max(l)) print max(l) max l count = 0 0 count flag = True True flag l = [] [] l count = 0 0 count count += 1 1 count

flag = True
count = 0
l = []

for s in input():
    if flag:
        if s == "R":
            count += 1
            l.append(count)
        else:
            l.append(0)
            count = 0


print(max(l))
