#                               #
    # author : samars_diary #
    # 13-09-2020 │ 12:48:09 #
#                               #

import sys, os.path

if(os.path.exists('input.txt')):
    sys.stdin = open('input.txt',"r")
    #sys.stdout = open('output.txt',"w")

sys.setrecursionlimit(10 ** 5)

def mod(): return 10**9+7
def i(): return sys.stdin.readline().strip()
def ii(): return int(sys.stdin.readline())
def li(): return list(sys.stdin.readline().strip())
def mii(): return map(int, sys.stdin.readline().split())
def lii(): return list(map(int, sys.stdin.readline().strip().split()))

#print=sys.stdout.write

def solve():
    a=li();b=ans=0
    if 'R' not in a:
        print(b)
    else:
        for i in range(len(a)):
            if a[i]=='R': b+=1 ; ans=max(ans,b)
            else: b=0
        print(ans)
solve() import sys, os.path sys os.path if(os.path.exists('input.txt')):
    sys.stdin = open('input.txt',"r")
    #sys.stdout = open('output.txt',"w") os.path.exists('input.txt') os.path.exists os.path os path exists 'input.txt' sys.stdin = open('input.txt',"r") sys.stdin sys stdin open('input.txt',"r") open 'input.txt' "r" sys.setrecursionlimit(10 ** 5) sys.setrecursionlimit sys setrecursionlimit 10 ** 5 10 5 def mod(): return 10**9+7 mod def i(): return sys.stdin.readline().strip() i def ii(): return int(sys.stdin.readline()) ii def li(): return list(sys.stdin.readline().strip()) li def mii(): return map(int, sys.stdin.readline().split()) mii def lii(): return list(map(int, sys.stdin.readline().strip().split()))

#print=sys.stdout.write lii def solve():
    a=li();b=ans=0
    if 'R' not in a:
        print(b)
    else:
        for i in range(len(a)):
            if a[i]=='R': b+=1 ; ans=max(ans,b)
            else: b=0
        print(ans) solve a=li() a li() li b=ans=0 b 0 =ans=0 ans 0 if 'R' not in a:
        print(b)
    else:
        for i in range(len(a)):
            if a[i]=='R': b+=1 ; ans=max(ans,b)
            else: b=0
        print(ans) 'R' not in a 'R' a print(b) print b for i in range(len(a)):
            if a[i]=='R': b+=1 ; ans=max(ans,b)
            else: b=0
         i range(len(a)) range len(a) len a if a[i]=='R': b+=1 ; ans=max(ans,b)
            else: b=0
         a[i]=='R' a[i] a i 'R' print(ans) print ans solve() solve def lii(): return list(map(int, sys.stdin.readline().strip().split()))

#print=sys.stdout.write def lii(): return list(map(int, sys.stdin.readline().strip().split()))

#print=sys.stdout.write lii def mii(): return map(int, sys.stdin.readline().split()) def mii(): return map(int, sys.stdin.readline().split()) mii def solve():
    a=li();b=ans=0
    if 'R' not in a:
        print(b)
    else:
        for i in range(len(a)):
            if a[i]=='R': b+=1 ; ans=max(ans,b)
            else: b=0
        print(ans) def solve():
    a=li();b=ans=0
    if 'R' not in a:
        print(b)
    else:
        for i in range(len(a)):
            if a[i]=='R': b+=1 ; ans=max(ans,b)
            else: b=0
        print(ans) solve def ii(): return int(sys.stdin.readline()) def ii(): return int(sys.stdin.readline()) ii def i(): return sys.stdin.readline().strip() def i(): return sys.stdin.readline().strip() i def li(): return list(sys.stdin.readline().strip()) def li(): return list(sys.stdin.readline().strip()) li def mod(): return 10**9+7 def mod(): return 10**9+7 mod
#                               #
    # author : samars_diary #
    # 13-09-2020 │ 12:48:09 #
#                               #

import sys, os.path

if(os.path.exists('input.txt')):
    sys.stdin = open('input.txt',"r")
    #sys.stdout = open('output.txt',"w")

sys.setrecursionlimit(10 ** 5)

def mod(): return 10**9+7
def i(): return sys.stdin.readline().strip()
def ii(): return int(sys.stdin.readline())
def li(): return list(sys.stdin.readline().strip())
def mii(): return map(int, sys.stdin.readline().split())
def lii(): return list(map(int, sys.stdin.readline().strip().split()))

#print=sys.stdout.write

def solve():
    a=li();b=ans=0
    if 'R' not in a:
        print(b)
    else:
        for i in range(len(a)):
            if a[i]=='R': b+=1 ; ans=max(ans,b)
            else: b=0
        print(ans)
solve()