
def main():
    s = input()
    if s[1] == "S":
        if s[0] == "R" or s[2] == "R":
            print(1)
        else:
            print(0)
    else:
        count = 0
        for i in range(3):
            if s[i] == "R":
                count += 1
        print(count)

if __name__ == '__main__':
    main() def main():
    s = input()
    if s[1] == "S":
        if s[0] == "R" or s[2] == "R":
            print(1)
        else:
            print(0)
    else:
        count = 0
        for i in range(3):
            if s[i] == "R":
                count += 1
        print(count) main s = input() s input() input if s[1] == "S":
        if s[0] == "R" or s[2] == "R":
            print(1)
        else:
            print(0)
    else:
        count = 0
        for i in range(3):
            if s[i] == "R":
                count += 1
        print(count) s[1] == "S" s[1] s 1 "S" if s[0] == "R" or s[2] == "R":
            print(1)
        else:
            print(0)
     s[0] == "R" or s[2] == "R" s[0] == "R" s[0] s 0 "R" s[2] == "R" s[2] s 2 "R" print(1) print 1 print(0) print 0 count = 0 count 0 for i in range(3):
            if s[i] == "R":
                count += 1
         i range(3) range 3 if s[i] == "R":
                count += 1
         s[i] == "R" s[i] s i "R" count += 1 count 1 print(count) print count if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    s = input()
    if s[1] == "S":
        if s[0] == "R" or s[2] == "R":
            print(1)
        else:
            print(0)
    else:
        count = 0
        for i in range(3):
            if s[i] == "R":
                count += 1
        print(count) def main():
    s = input()
    if s[1] == "S":
        if s[0] == "R" or s[2] == "R":
            print(1)
        else:
            print(0)
    else:
        count = 0
        for i in range(3):
            if s[i] == "R":
                count += 1
        print(count) main

def main():
    s = input()
    if s[1] == "S":
        if s[0] == "R" or s[2] == "R":
            print(1)
        else:
            print(0)
    else:
        count = 0
        for i in range(3):
            if s[i] == "R":
                count += 1
        print(count)

if __name__ == '__main__':
    main()
