import sys

input = lambda: sys.stdin.readline().rstrip()



def main():

    S = eval(input())

    ans = 0

    if S[0] == 'R' and S[1] == 'R' and S[2] == 'R':

        ans = 3

    elif (S[0] == 'R' and S[1] == 'R') or S[1] == 'R' and S[2] == 'R':

        ans = 2

    elif 'R' in S:

        ans = 1

    else:

        ans = 0

    print(ans)



if __name__ == '__main__':

    main()

import sys

input = lambda: sys.stdin.readline().rstrip()



def main():

    S = eval(input())

    ans = 0

    cnt = 0

    for i in range(len(S)):

        if S[i] == 'R':

            cnt += 1

            ans = max(ans, cnt)

        else:

            cnt = 0

    # if S[0] == 'R' and S[1] == 'R' and S[2] == 'R':

    #     ans = 3

    # elif (S[0] == 'R' and S[1] == 'R') or S[1] == 'R' and S[2] == 'R':

    #     ans = 2

    # elif 'R' in S:

    #     ans = 1

    # else:

    #     ans = 0

    print(ans)



if __name__ == '__main__':

    main()

import sys

input = lambda: sys.stdin.readline().rstrip()


def main():
    S = eval(input())
    ans = 0
    if S[0] == "R" and S[1] == "R" and S[2] == "R":
        ans = 3
    elif (S[0] == "R" and S[1] == "R") or S[1] == "R" and S[2] == "R":
        ans = 2
    elif "R" in S:
        ans = 1
    else:
        ans = 0
    print(ans)


if __name__ == "__main__":
    main()

import sys

input = lambda: sys.stdin.readline().rstrip()


def main():
    S = eval(input())
    ans = 0
    cnt = 0
    for i in range(len(S)):
        if S[i] == "R":
            cnt += 1
            ans = max(ans, cnt)
        else:
            cnt = 0
    # if S[0] == 'R' and S[1] == 'R' and S[2] == 'R':
    #     ans = 3
    # elif (S[0] == 'R' and S[1] == 'R') or S[1] == 'R' and S[2] == 'R':
    #     ans = 2
    # elif 'R' in S:
    #     ans = 1
    # else:
    #     ans = 0
    print(ans)


if __name__ == "__main__":
    main()

-    if S[0] == "R" and S[1] == "R" and S[2] == "R": -        ans = 3 -    elif (S[0] == "R" and S[1] == "R") or S[1] == "R" and S[2] == "R": -        ans = 2 -    elif "R" in S: -        ans = 1 -    else: -        ans = 0 +    cnt = 0 +    for i in range(len(S)): +        if S[i] == "R": +            cnt += 1 +            ans = max(ans, cnt) +        else: +            cnt = 0 +    # if S[0] == 'R' and S[1] == 'R' and S[2] == 'R': +    #     ans = 3 +    # elif (S[0] == 'R' and S[1] == 'R') or S[1] == 'R' and S[2] == 'R': +    #     ans = 2 +    # elif 'R' in S: +    #     ans = 1 +    # else: +    #     ans = 0