s = input().strip()
res, tmp = 0, 0

for c in s:
    if c == 'R':
        tmp += 1
        res = max(res, tmp)
    else:
        tmp = 0

print(res) s = input().strip() s input().strip() ().strip () input strip res, tmp = 0, 0 res 0 tmp 0 for c in s:
    if c == 'R':
        tmp += 1
        res = max(res, tmp)
    else:
        tmp = 0 c s if c == 'R':
        tmp += 1
        res = max(res, tmp)
    else:
        tmp = 0 c == 'R' c 'R' tmp += 1 tmp 1 res = max(res, tmp) res max(res, tmp) max res tmp tmp = 0 tmp 0 print(res) print res res = max(res, tmp) max(res, tmp) res tmp += 1 1 tmp res, tmp = 0, 0 0 res tmp = 0 0 tmp tmp = 0, 0 0 tmp s = input().strip() input().strip() s
s = input().strip()
res, tmp = 0, 0

for c in s:
    if c == 'R':
        tmp += 1
        res = max(res, tmp)
    else:
        tmp = 0

print(res)