S = input()
rain_d = 0
max_rain_d = 0
for s in S:
    if s == 'R':
        rain_d += 1
        max_rain_d = rain_d
    elif s == 'S':
        rain_d = 0
print(max_rain_d) S = input() S input() input rain_d = 0 rain_d 0 max_rain_d = 0 max_rain_d 0 for s in S:
    if s == 'R':
        rain_d += 1
        max_rain_d = rain_d
    elif s == 'S':
        rain_d = 0 s S if s == 'R':
        rain_d += 1
        max_rain_d = rain_d
    elif s == 'S':
        rain_d = 0 s == 'R' s 'R' rain_d += 1 rain_d 1 max_rain_d = rain_d max_rain_d rain_d elif s == 'S':
        rain_d = 0 s == 'S' s 'S' rain_d = 0 rain_d 0 print(max_rain_d) print max_rain_d rain_d = 0 0 rain_d max_rain_d = rain_d rain_d max_rain_d max_rain_d = 0 0 max_rain_d rain_d += 1 1 rain_d rain_d = 0 0 rain_d S = input() input() S
S = input()
rain_d = 0
max_rain_d = 0
for s in S:
    if s == 'R':
        rain_d += 1
        max_rain_d = rain_d
    elif s == 'S':
        rain_d = 0
print(max_rain_d)