import sys

if __name__ == '__main__':
    S = sys.stdin.readline()
    if 'RRR' in S:
        print(3)
    elif 'RR' in S:
        print(2)
    elif 'R' in S:
        print(1)
    else:
        print(0) import sys sys if __name__ == '__main__':
    S = sys.stdin.readline()
    if 'RRR' in S:
        print(3)
    elif 'RR' in S:
        print(2)
    elif 'R' in S:
        print(1)
    else:
        print(0) __name__ == '__main__' __name__ '__main__' S = sys.stdin.readline() S sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline 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 S = sys.stdin.readline() sys.stdin.readline() S
import sys

if __name__ == '__main__':
    S = sys.stdin.readline()
    if 'RRR' in S:
        print(3)
    elif 'RR' in S:
        print(2)
    elif 'R' in S:
        print(1)
    else:
        print(0)