s = input()
m = 0
temp = 0
for i in range(3):
    if s[i] == 'R':
        temp += 1
        if temp > m:
            m = temp
    else:
        if temp > m:
            m = temp
        temp = 0
print(m) s = input() s input() input m = 0 m 0 temp = 0 temp 0 for i in range(3):
    if s[i] == 'R':
        temp += 1
        if temp > m:
            m = temp
    else:
        if temp > m:
            m = temp
        temp = 0 i range(3) range 3 if s[i] == 'R':
        temp += 1
        if temp > m:
            m = temp
    else:
        if temp > m:
            m = temp
        temp = 0 s[i] == 'R' s[i] s i 'R' temp += 1 temp 1 if temp > m:
            m = temp
     temp > m temp m m = temp m temp if temp > m:
            m = temp
         temp > m temp m m = temp m temp temp = 0 temp 0 print(m) print m m = 0 0 m temp += 1 1 temp s = input() input() s m = temp temp m temp = 0 0 temp temp = 0 0 temp m = temp temp m
s = input()
m = 0
temp = 0
for i in range(3):
    if s[i] == 'R':
        temp += 1
        if temp > m:
            m = temp
    else:
        if temp > m:
            m = temp
        temp = 0
print(m)