s = input()
rd = 0
max_rd = 0
for i in range(len(s)):
    if s[i] == 'R':
        rd += 1
        if max_rd < rd:
            max_rd = rd
    else:
        rd = 0
print(max_rd) s = input() s input() input rd = 0 rd 0 max_rd = 0 max_rd 0 for i in range(len(s)):
    if s[i] == 'R':
        rd += 1
        if max_rd < rd:
            max_rd = rd
    else:
        rd = 0 i range(len(s)) range len(s) len s if s[i] == 'R':
        rd += 1
        if max_rd < rd:
            max_rd = rd
    else:
        rd = 0 s[i] == 'R' s[i] s i 'R' rd += 1 rd 1 if max_rd < rd:
            max_rd = rd
     max_rd < rd max_rd rd max_rd = rd max_rd rd rd = 0 rd 0 print(max_rd) print max_rd s = input() input() s rd += 1 1 rd rd = 0 0 rd max_rd = 0 0 max_rd rd = 0 0 rd max_rd = rd rd max_rd
s = input()
rd = 0
max_rd = 0
for i in range(len(s)):
    if s[i] == 'R':
        rd += 1
        if max_rd < rd:
            max_rd = rd
    else:
        rd = 0
print(max_rd)