import math
import collections
import itertools

def resolve():
    S=input()
    if("RRR" in S):
        print(3)
    elif("RR" in S):
        print(2)
    elif("R" in S):
        print(1)
    else:
        print(0)

resolve() import math math import collections collections import itertools itertools def resolve():
    S=input()
    if("RRR" in S):
        print(3)
    elif("RR" in S):
        print(2)
    elif("R" in S):
        print(1)
    else:
        print(0) resolve 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 resolve() resolve def resolve():
    S=input()
    if("RRR" in S):
        print(3)
    elif("RR" in S):
        print(2)
    elif("R" in S):
        print(1)
    else:
        print(0) def resolve():
    S=input()
    if("RRR" in S):
        print(3)
    elif("RR" in S):
        print(2)
    elif("R" in S):
        print(1)
    else:
        print(0) resolve
import math
import collections
import itertools

def resolve():
    S=input()
    if("RRR" in S):
        print(3)
    elif("RR" in S):
        print(2)
    elif("R" in S):
        print(1)
    else:
        print(0)

resolve()