S = input().rstrip()
num = 0
mnum = 0
for c in S:
    if c == 'R':
        num += 1
    else:
        num = 0

    if mnum < num:
        mnum = num

print(mnum) S = input().rstrip() S input().rstrip() ().rstrip () input rstrip num = 0 num 0 mnum = 0 mnum 0 for c in S:
    if c == 'R':
        num += 1
    else:
        num = 0

    if mnum < num:
        mnum = num c S if c == 'R':
        num += 1
    else:
        num = 0

     c == 'R' c 'R' num += 1 num 1 num = 0 num 0 if mnum < num:
        mnum = num mnum < num mnum num mnum = num mnum num print(mnum) print mnum mnum = 0 0 mnum mnum = num num mnum num += 1 1 num num = 0 0 num S = input().rstrip() input().rstrip() S num = 0 0 num
S = input().rstrip()
num = 0
mnum = 0
for c in S:
    if c == 'R':
        num += 1
    else:
        num = 0

    if mnum < num:
        mnum = num

print(mnum)
