days = input()
consecutive_days = 0
max_days = 0

if 'R' in days:
    max_days = 1
    consecutive_days = 1

for weather in range(len(days) - 1):
    if days[weather] == days[weather + 1] and days[weather] == 'R':
        consecutive_days += 1
        if consecutive_days > max_days:
            max_days = consecutive_days

print(max_days) days = input() days input() input consecutive_days = 0 consecutive_days 0 max_days = 0 max_days 0 if 'R' in days:
    max_days = 1
    consecutive_days = 1 'R' in days 'R' days max_days = 1 max_days 1 consecutive_days = 1 consecutive_days 1 for weather in range(len(days) - 1):
    if days[weather] == days[weather + 1] and days[weather] == 'R':
        consecutive_days += 1
        if consecutive_days > max_days:
            max_days = consecutive_days weather range(len(days) - 1) range len(days) - 1 len(days) len days 1 if days[weather] == days[weather + 1] and days[weather] == 'R':
        consecutive_days += 1
        if consecutive_days > max_days:
            max_days = consecutive_days days[weather] == days[weather + 1] and days[weather] == 'R' days[weather] == days[weather + 1] days[weather] days weather days[weather + 1] days weather + 1 weather 1 days[weather] == 'R' days[weather] days weather 'R' consecutive_days += 1 consecutive_days 1 if consecutive_days > max_days:
            max_days = consecutive_days consecutive_days > max_days consecutive_days max_days max_days = consecutive_days max_days consecutive_days print(max_days) print max_days consecutive_days += 1 1 consecutive_days consecutive_days = 1 1 consecutive_days days = input() input() days max_days = 1 1 max_days max_days = 0 0 max_days max_days = consecutive_days consecutive_days max_days consecutive_days = 0 0 consecutive_days
days = input()
consecutive_days = 0
max_days = 0

if 'R' in days:
    max_days = 1
    consecutive_days = 1

for weather in range(len(days) - 1):
    if days[weather] == days[weather + 1] and days[weather] == 'R':
        consecutive_days += 1
        if consecutive_days > max_days:
            max_days = consecutive_days

print(max_days)