def resolve():
    s = str(input())
    ans = 0
    if 'R' in s:
        ans = 1

    if 'RR' in s:
        ans = 2

    if 'RRR' in s:
        ans = 3

    print(ans)

resolve() def resolve():
    s = str(input())
    ans = 0
    if 'R' in s:
        ans = 1

    if 'RR' in s:
        ans = 2

    if 'RRR' in s:
        ans = 3

    print(ans) resolve s = str(input()) s str(input()) str input() input ans = 0 ans 0 if 'R' in s:
        ans = 1

     'R' in s 'R' s ans = 1 ans 1 if 'RR' in s:
        ans = 2

     'RR' in s 'RR' s ans = 2 ans 2 if 'RRR' in s:
        ans = 3

     'RRR' in s 'RRR' s ans = 3 ans 3 print(ans) print ans resolve() resolve def resolve():
    s = str(input())
    ans = 0
    if 'R' in s:
        ans = 1

    if 'RR' in s:
        ans = 2

    if 'RRR' in s:
        ans = 3

    print(ans) def resolve():
    s = str(input())
    ans = 0
    if 'R' in s:
        ans = 1

    if 'RR' in s:
        ans = 2

    if 'RRR' in s:
        ans = 3

    print(ans) resolve
def resolve():
    s = str(input())
    ans = 0
    if 'R' in s:
        ans = 1

    if 'RR' in s:
        ans = 2

    if 'RRR' in s:
        ans = 3

    print(ans)

resolve()