def main():
    S = input()

    if "RRR" in S:
        print(3)

    elif "RR" in S:
        print(2)

    elif "R" in S:
        print(1)

    else:
        print(0)


if __name__ == '__main__':
    main() def main():
    S = input()

    if "RRR" in S:
        print(3)

    elif "RR" in S:
        print(2)

    elif "R" in S:
        print(1)

    else:
        print(0) main S = input() S input() input if "RRR" in S:
        print(3)

    elif "RR" in S:
        print(2)

    elif "R" in S:
        print(1)

    else:
        print(0) "RRR" in S "RRR" S print(3) print 3 elif "RR" in S:
        print(2)

     "RR" in S "RR" S print(2) print 2 elif "R" in S:
        print(1)

     "R" in S "R" S print(1) print 1 print(0) print 0 if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    S = input()

    if "RRR" in S:
        print(3)

    elif "RR" in S:
        print(2)

    elif "R" in S:
        print(1)

    else:
        print(0) def main():
    S = input()

    if "RRR" in S:
        print(3)

    elif "RR" in S:
        print(2)

    elif "R" in S:
        print(1)

    else:
        print(0) main
def main():
    S = input()

    if "RRR" in S:
        print(3)

    elif "RR" in S:
        print(2)

    elif "R" in S:
        print(1)

    else:
        print(0)


if __name__ == '__main__':
    main()
