weather = list(input())

i = 0
j = 0
days = 0
consecutive = []

while i <= 2:
    while i + j <= 2:
        if weather[i+j] == "R":
            days += 1
            j += 1
        else:
            break
    i += 1
    j = 0
    consecutive.append(days)
    days = 0

print(max(consecutive)) weather = list(input()) weather list(input()) list input() input i = 0 i 0 j = 0 j 0 days = 0 days 0 consecutive = [] consecutive [] while i <= 2:
    while i + j <= 2:
        if weather[i+j] == "R":
            days += 1
            j += 1
        else:
            break
    i += 1
    j = 0
    consecutive.append(days)
    days = 0 i <= 2 i 2 while i + j <= 2:
        if weather[i+j] == "R":
            days += 1
            j += 1
        else:
            break
     i + j <= 2 i + j i j 2 if weather[i+j] == "R":
            days += 1
            j += 1
        else:
            break
     weather[i+j] == "R" weather[i+j] weather i+j i j "R" days += 1 days 1 j += 1 j 1 break i += 1 i 1 j = 0 j 0 consecutive.append(days) consecutive.append consecutive append days days = 0 days 0 print(max(consecutive)) print max(consecutive) max consecutive days += 1 1 days days = 0 0 days j = 0 0 j j = 0 0 j consecutive = [] [] consecutive i += 1 1 i weather = list(input()) list(input()) weather i = 0 0 i j += 1 1 j days = 0 0 days
weather = list(input())

i = 0
j = 0
days = 0
consecutive = []

while i <= 2:
    while i + j <= 2:
        if weather[i+j] == "R":
            days += 1
            j += 1
        else:
            break
    i += 1
    j = 0
    consecutive.append(days)
    days = 0

print(max(consecutive))
