S = input()
length = len(S)
while True:
    R_l = "R" * length
    if R_l in S:
        print(length)
        break
    else:
        length -=1 S = input() S input() input length = len(S) length len(S) len S while True:
    R_l = "R" * length
    if R_l in S:
        print(length)
        break
    else:
        length -=1 True R_l = "R" * length R_l "R" * length "R" length if R_l in S:
        print(length)
        break
    else:
        length -=1 R_l in S R_l S print(length) print length break length -=1 length 1 length -=1 1 length length = len(S) len(S) length S = input() input() S R_l = "R" * length "R" * length R_l
S = input()
length = len(S)
while True:
    R_l = "R" * length
    if R_l in S:
        print(length)
        break
    else:
        length -=1