num = input()

streaks = []
streak = 0
for letter in num:
    if letter == "R":
        streak += 1
    elif letter != "R":
        streaks.append(streak)
        streak = 0
else:
    streaks.append(streak)

print(max(streaks)) num = input() num input() input streaks = [] streaks [] streak = 0 streak 0 for letter in num:
    if letter == "R":
        streak += 1
    elif letter != "R":
        streaks.append(streak)
        streak = 0
else:
    streaks.append(streak) letter num if letter == "R":
        streak += 1
    elif letter != "R":
        streaks.append(streak)
        streak = 0 letter == "R" letter "R" streak += 1 streak 1 elif letter != "R":
        streaks.append(streak)
        streak = 0 letter != "R" letter "R" streaks.append(streak) streaks.append streaks append streak streak = 0 streak 0 streaks.append(streak) streaks.append streaks append streak print(max(streaks)) print max(streaks) max streaks num = input() input() num streak = 0 0 streak streak = 0 0 streak streak += 1 1 streak streaks = [] [] streaks
num = input()

streaks = []
streak = 0
for letter in num:
    if letter == "R":
        streak += 1
    elif letter != "R":
        streaks.append(streak)
        streak = 0
else:
    streaks.append(streak)

print(max(streaks))