def resolve():
    s = input()
    if "RRR" in s:
        res = 3
    elif "RR" in s:
        res = 2
    elif "R" in s:
        res = 1
    else:
        res = 0
    print(res)
resolve() def resolve():
    s = input()
    if "RRR" in s:
        res = 3
    elif "RR" in s:
        res = 2
    elif "R" in s:
        res = 1
    else:
        res = 0
    print(res) resolve s = input() s input() input if "RRR" in s:
        res = 3
    elif "RR" in s:
        res = 2
    elif "R" in s:
        res = 1
    else:
        res = 0
     "RRR" in s "RRR" s res = 3 res 3 elif "RR" in s:
        res = 2
     "RR" in s "RR" s res = 2 res 2 elif "R" in s:
        res = 1
     "R" in s "R" s res = 1 res 1 res = 0 res 0 print(res) print res resolve() resolve def resolve():
    s = input()
    if "RRR" in s:
        res = 3
    elif "RR" in s:
        res = 2
    elif "R" in s:
        res = 1
    else:
        res = 0
    print(res) def resolve():
    s = input()
    if "RRR" in s:
        res = 3
    elif "RR" in s:
        res = 2
    elif "R" in s:
        res = 1
    else:
        res = 0
    print(res) resolve
def resolve():
    s = input()
    if "RRR" in s:
        res = 3
    elif "RR" in s:
        res = 2
    elif "R" in s:
        res = 1
    else:
        res = 0
    print(res)
resolve()