import sys

sys.setrecursionlimit(10**9)



def mi(): return list(map(int,input().split()))

def ii(): return int(eval(input()))

def isp(): return input().split()

def deb(text): print(("-------\n{}\n-------".format(text)))



INF=10**20

def main():

    S = eval(input())



    if S == "RRR":

        print((3))

    elif S[1:3] == "RR" or S[0:2] == "RR":

        print((2))

    else:

        ans = 0

        for s in S:

            if s == "R":

                ans = 1

        print(ans)













if __name__ == "__main__":

    main()
#! /usr/bin/env python3

import sys

sys.setrecursionlimit(10**9)





INF=10**20

def solve(S: str):

    if S == "RRR":  

        print((3))

    elif S[1:3] == "RR" or S[0:2] == "RR":

        print((2))

    else:

        ans = 0

        for s in S:

            if s == "R":

                ans = 1

        print(ans)

 

    return



def main():

    def iterate_tokens():

        for line in sys.stdin:

            for word in line.split():

                yield word

    tokens = iterate_tokens()

    S = next(tokens)  # type: str

    solve(S)







if __name__ == "__main__":

    main()

import sys

sys.setrecursionlimit(10**9)


def mi():
    return list(map(int, input().split()))


def ii():
    return int(eval(input()))


def isp():
    return input().split()


def deb(text):
    print(("-------\n{}\n-------".format(text)))


INF = 10**20


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


if __name__ == "__main__":
    main()

#! /usr/bin/env python3
import sys

sys.setrecursionlimit(10**9)
INF = 10**20


def solve(S: str):
    if S == "RRR":
        print((3))
    elif S[1:3] == "RR" or S[0:2] == "RR":
        print((2))
    else:
        ans = 0
        for s in S:
            if s == "R":
                ans = 1
        print(ans)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)


if __name__ == "__main__":
    main()

+#! /usr/bin/env python3 - - -def mi(): -    return list(map(int, input().split())) - - -def ii(): -    return int(eval(input())) - - -def isp(): -    return input().split() - - -def deb(text): - - -def main(): -    S = eval(input()) +def solve(S: str): +    return + + +def main(): +    def iterate_tokens(): +        for line in sys.stdin: +            for word in line.split(): +                yield word + +    tokens = iterate_tokens() +    S = next(tokens)  # type: str +    solve(S)