import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
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() import sys sys read = sys.stdin.read read sys.stdin.read sys.stdin sys stdin read readlines = sys.stdin.readlines readlines sys.stdin.readlines sys.stdin sys stdin readlines 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 readlines = sys.stdin.readlines sys.stdin.readlines readlines 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 read = sys.stdin.read sys.stdin.read read
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
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()