Problem:
 Score : 100 points    Problem Statement We have weather records at AtCoder Town for some consecutive three days. A string of length 3 , S , represents the records - if the i -th character is S , it means it was sunny on the i -th day; if that character is R , it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.      Constraints  |S| = 3  Each character of S is S or R .         Input Input is given from Standard Input in the following format:  S       Output Print the maximum number of consecutive rainy days in the period.        Sample Input 1 RRS      Sample Output 1 2  We had rain on the 1 -st and 2 -nd days in the period. Here, the maximum number of consecutive rainy days is 2 , so we should print 2 .       Sample Input 2 SSS      Sample Output 2 0  It was sunny throughout the period. We had no rainy days, so we should print 0 .       Sample Input 3 RSR      Sample Output 3 1  We had rain on the 1 -st and 3 -rd days - two "streaks" of one rainy day, so we should print 1 .

Solution (Python):
s = input()
if s == "RRR":
    print(3)
elif "RR" in s:
    print(2)
elif "R" in s:
    print(1)
else:
    print(0)

Solution (Python):
import sys
input = sys.stdin.readline



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

    return


if __name__ == "__main__":
    main()

Solution (Python):
def solve():
    S = input()
    cnt = 0
    ans = 0
    for s in S:
        if s == 'R':
            cnt += 1
        else:
            ans = max(ans,cnt)
            cnt = 0
    else:
        ans = max(ans,cnt)
    
    print(ans)

if __name__ == '__main__':
    solve()

Solution (Python):
s = input()
if s == "RRR": ans = 3
elif s == "RRS" or s == "SRR": ans = 2
elif "R" in s: ans = 1
else: ans = 0
print(ans)

Solution (Python):
def Next(): return input()
def NextInt(): return int(Next())
def NextInts(): return map(int,input().split())
def Nexts(): return map(str,input().split())
def NextIntList(): return list(map(int,input().split()))
def RowInts(n): return [input() for i in range(n)]

s = input()
ans  = 0
tmp = 0
for i in s:
    if i == 'R':
        tmp += 1
        ans  = max(ans, tmp)
    else:
        tmp = 0
    
print(ans)

Solution (Python):
import sys
from itertools import groupby
input = sys.stdin.readline
S = input()

dic = groupby(S)
ans = 0
for i,v in dic:
    v = list(v)
    if i == 'R':
        ans = max(ans, len(v))
print(ans)

Solution (Python):
s = input()
ans = 3 if 'RRR' in s else 2 if 'RR' in s else 1 if 'R' in s else 0
print(ans)

Solution (Python):
s = input()
if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
S=input()
if S=="RSR":
    print(1)
else:
    print(S.count("R"))

Solution (Python):
s = input()
cnt = 0
ans = 0
for i in s:
    if i == "R":
        ans = max(cnt+1,ans)
        cnt += 1
    else:
        cnt = 0
print(ans)

Solution (Python):
S = input()
if S == 'RRR':
    print(3)
elif S.find('RR') != -1:
    print(2)
elif S.find('R') != -1:
    print(1)
else:
    print(0)

Solution (Python):
s = input()
cnt = 0
ans = 0
for si in s:
    if si == 'R':
        cnt += 1
    else:
        cnt = 0
    ans = max(ans, cnt)
print(ans)

Solution (Python):


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    S = input()
    if 'RRR' in S:
        return 3
    if 'RR' in S:
        return 2
    if 'R' in S:
        return 1
    return 0


if __name__ == '__main__':
    print(solve())

Solution (Python):
import sys
input = sys.stdin.readline

s = input()

if "RRR" in s:
    print(3)
elif "RR" in s:
    print(2)
elif "R" in s:
    print(1)
else:
    print(0)

Solution (Python):
s = input()
prev = "R"
res = 0
a = 0
for c in s :
    if c=="R" :
        a+=1
    else :
        a = 0
    res = max(res, a)
print(res)

Solution (Python):
S = input()

if 'RRR' in S:
  print(3)
elif 'RR' in S:
  print(2)
elif 'R' in S:
  print(1)
else:
  print(0)

Solution (Python):
import re
import sys
from collections import (
    Counter,
    defaultdict as ddict,
    deque,
)
from functools import lru_cache
from heapq import *
from itertools import *
from string import (
    ascii_letters as letters,
    ascii_lowercase as ucletters,
    ascii_uppercase as lcletters,
    digits,
)

alnum=digits+letters
hexdigits=digits+'ABCDEFabcdef'

cache=lru_cache(None)

inf=float('inf')
ansmod=1000000007
int8_min=-128
int16_min=-32768
int32_min=-2147483648
int64_min=-9223372036854775808
int8_max=127
int16_max=32767
int32_max=2147483647
int64_max=9223372036854775807
uint8_max=255
uint16_max=65535
uint32_max=4294967295
uint64_max=18446744073709551615

rfs=lambda:rl().split()
ri=lambda:int(rl())
ris=lambda:list(map(int,rfs()))
rl=lambda:next(sys.stdin)
rrs=lambda:list(map(str.strip,sys.stdin))
rs=lambda:rl().strip()
rt=lambda:sys.stdin.read()
rg=lambda:list(map(list,rrs()))
rig=lambda:[[*map(int,x.split())] for x in rls()]

def nbs4(i,j):
    return [
                (i-1,j),
        (i,j-1),        (i,j+1),
                (i+1,j),
    ]

def nbs8(i,j):
    return [
        (i-1,j-1),(i-1,j),(i-1,j+1),
        (  i,j-1),        (  i,j+1),
        (i+1,j-1),(i+1,j),(i+1,j+1),
    ]

inb=lambda i,j,m,n:0<=i<m and 0<=j<n

sys.setrecursionlimit(int32_max)



S=input()
ans=k=0
for x in S:
    if x=='R':
        k+=1
    else:
        k=0
    ans=max(ans,k)
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
from collections import *

s = input()[:-1]
l = []
cnt = 1
    
for i in range(len(s)-1):
    if s[i]!=s[i+1]:
        l.append((s[i], cnt))
        cnt = 1
    else:
        cnt += 1
    
l.append((s[-1], cnt))
ans = 0

for si, c in l:
    if si=='R':
        ans = max(ans, c)

print(ans)

Solution (Python):
S = input()
rainy = 0
answer = 0
for s in S:
    if s == 'R':
        rainy += 1
        if rainy > answer:
            answer = rainy
    else:
        rainy = 0
print(answer)

Solution (Python):
S=input()

if S=="RRR":
    print(3)
elif S=="RRS" or S=="SRR":
    print(2)
elif S.find("R")!=-1:
    print(1)
else:
    print(0)

Solution (Python):
"""
                            pppppppppppppppppppp
                         ppppp  ppppppppppppppppppp
                      ppppppp    ppppppppppppppppppppp
                      pppppppp  pppppppppppppppppppppp
                      pppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppppp
       ppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppp
      pppppppppppppppppppppppppppppppppppppppppppppppp  ppppppppppppppppppppp
     ppppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppppp
    ppppppppppppppppppppppppppppppppppppppppppppppp    pppppppppppppppppppppppp
   pppppppppppppppppppppppppppppppppppppppppppppp     pppppppppppppppppppppppppp
  ppppppppppppppppppppppppppppppppppppppppppppp      pppppppppppppppppppppppppppp
  pppppppppppppppppppppppppppppppp               pppppppppppppppppppppppppppppppp
  pppppppppppppppppppppppppppp     pppppppppppppppppppppppppppppppppppppppppppppp
  ppppppppppppppppppppppppppp    pppppppppppppppppppppppppppppppppppppppppppppppp
    pppppppppppppppppppppppp  pppppppppppppppppppppppppppppppppppppppppppppppppp
     ppppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppppp
      pppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppp
       ppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppppp
                              pppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppp  pppppppp
                              ppppppppppppppppppppp    ppppppp
                                 ppppppppppppppppppp  ppppp
                                    pppppppppppppppppppp
"""


import sys
from functools import lru_cache, cmp_to_key
from collections import defaultdict as dd, deque, Counter as C
from bisect import bisect_left as bl, bisect_right as br, bisect
from heapq import heapify, heappop, heappush
from math import ceil, log, floor, sqrt
mod = pow(10, 9) + 7
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(var, end="\n"): sys.stdout.write(str(var)+end)
def outa(*var, end="\n"): sys.stdout.write(' '.join(map(str, var)) + end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


answer = 0
s = data()
cnt = 0
for i in s:
    if i == "S":
        answer = max(answer, cnt)
        cnt = 0
    else:
        cnt += 1
out(max(answer, cnt))

Solution (Python):
s=input()
ans=0
cnt=0
for i in s:
  if i=='R':
      cnt+=1
      ans=max(ans,cnt)
  else:
      cnt=0

print(ans)

Solution (Python):
s = input()
ans = 0
cnt = 0
for c in s:
    if c=='R':
        cnt += 1
    else:
        ans = max(ans, cnt)
        cnt = 0
ans = max(ans, cnt)
print(ans)

Solution (Python):
s = input()

if s in ['SSS']:
    ans = 0
elif s in ['SSR', 'SRS', 'RSS', 'RSR']:
    ans = 1
elif s in ['SRR', 'RRS']:
    ans = 2
else:
    ans = 3

print(ans)

Solution (Python):
S = input()

if 'RRR' in S:
    print(3)
elif 'RR' in S:
    print(2)
elif 'R' in S:
    print(1)
else:
    print(0)

Solution (Python):
s = input()
if "RRR" in s : print(3)
elif "RR" in s : print(2)
elif "R" in s: print(1)
else: print(0)

Solution (Python):
s=input()
rcount=0
for i in range(3):
  if s[i]=='R':
    rcount+=1
if s=='RSR':
  rcount-=1
print(rcount)

Solution (Python):
S = input()
if 'RRR' in S: print(3)
elif 'RR' in S: print(2)
elif 'R' in S: print(1)
else: print(0)

Solution (Python):
s = input()
c = 0
ans = 0
for i in s:
    if i=='R':
        c += 1
    if i=='S':
        ans = max(ans,c)
        c = 0
ans = max(ans,c)
print(ans)

Solution (Python):
N = input()
if N == 'RSR':
    print(1)
else:
    print(N.count('R'))

Solution (Python):
s = input()
if s[0] == s[1] == s[2] == "R":
    print(3)
elif s[0] == s[1] == "R" or s[1] == s[2] == "R":
    print(2)
elif "R" in s:
    print(1)
else:
    print(0)

Solution (Python):
s=input()
if s=="RSR":
  ans=1
else:
  ans=s.count("R")

print(ans)

Solution (Python):
d = input()

if "RRR" in d:
    print("3")
elif "RR" in d:
    print("2")
elif "R" in d:
    print("1")
else:
    print("0")

Solution (Python):
t = input()
if "RRR" in t:
    print(3)
elif "RR" in t:
    print(2)
elif "R" in t:
    print(1)
else:
    print(0)

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

Solution (Python):
S=input()

if 'RRR' in S:print(3)
elif 'RR' in S:print(2)
elif 'R' in S:print(1)
else:print(0)

Solution (Python):
s = input()

count = 0
ans = 0

for i in range(3):
    if s[i] == 'R':
        count += 1
        ans = max(ans, count)
    else:
        count = 0

print(ans)

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    S = input()
    if S == 'RRR':
        print(3)
    else:
        if 'RR' in S:
            print(2)
        else:
            if 'R' in S:
                print(1)
            else:
                print(0)

if __name__ == '__main__':
    main()

Solution (Python):


S = input()

M = 0
m = 0
for w in S:
  if w == 'R':
    m += 1
  else:
    m = 0
  if m > M:
    M = m

print(M)

Solution (Python):
a = input().split('S')
print(len(max(a)))

Solution (Python):
S = input()

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

Solution (Python):
s = input()

if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
def main():
    s = input()
    ans = 0
    cnt = 0
    for c in s:
        if c == "R":
            cnt += 1
            if ans < cnt:
                ans = cnt
        else:
            cnt = 0
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
S = input().strip()
ans = 0
c = 0
for s in S:
    if s == "R":
        c += 1
    else:
        c = 0
    ans = max(ans, c)
print(ans)

Solution (Python):
s = input()

if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
s = input()
if s == "RSR":
  print(1)
else:
  print(s.count("R"))

Solution (Python):
S = input()

def it(s):
    c = 0
    for v in s:
        if v == 'R':
            c += 1
        else:
            c = 0
        yield c

print(max(it(S)))

Solution (Python):
def resolve():
    s = input()
    ans = 0
    rain = 0
    for i in range(3):
        if s[i] == "R":
            rain += 1
            ans = max(ans, rain)
        else:
            rain = 0
    print(ans)
resolve()

Solution (Python):
S=input()
cnt=0
ans=0
for i in range(3):
    if S[i] =="R":
        cnt+=1
    if S[i] =="S":
        cnt=0
    ans=max(ans,cnt)
print(ans)

Solution (Python):
import random


def gcd(a, b):
    if a == 0:
        return b
    return gcd(b % a, a)


def lcm(a, b):
    return (a * b) / gcd(a, b)

s=input()
c=0
a=[]
for i in s:
    if i=='R':
        c+=1
    else:
        a.append(c)
        c=0
a.append(c)
print(max(a))

Solution (Python):
s=input()
c=s.count('R')
if s=='RSR':
  c-=1
print(c)

Solution (Python):
import sys

def solve():
    input = sys.stdin.readline
    S = input()
    if "RRR" in S:
        print(3)
    elif "RR" in S:
        print(2)
    elif "R" in S:
        print(1)
    else:
        print(0)

    return 0

if __name__ == "__main__":
    solve()

Solution (Python):

def main():
    s = input()
    counter = 0
    mx = 0
    for c in s:
        if c == "S":
            counter = 0
        else:
            counter += 1
            mx = max(counter,mx)

    print(mx)

if __name__ == '__main__':
    main()

Solution (Python):
s = input()
if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
n = input()
a = n.count("R")
if n[1]=="S" and a == 2:
    a  = 1
print(a)

Solution (Python):
print(max(map(len,input().split("S"))))

Solution (Python):
S=input()
print(3 if S=="RRR" else 2 if "RR" in S else 1 if "R" in S else 0)

Solution (Python):
s = input().split('S')
ans = max([len(x) for x in s])
print(ans)

Solution (Python):
from sys import stdin,stdout
for _ in range(1):
    
    
    s=input().split('S')
    print(max(len(wrd) for wrd in s))

Solution (Python):
s=input()

if s=="RRR":
    print(3)
elif s=="SSS":
    print(0)
elif s=="RRS" or s=="SRR":
    print(2)
else:
    print(1)

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache





MOD = 10**9+7
INF = float('inf')
AZ = "abcdefghijklmnopqrstuvwxyz"






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]



def DD(arg): return defaultdict(arg)


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n): return kaijo_memo[n]
  if(len(kaijo_memo) == 0): kaijo_memo.append(1)
  while(len(kaijo_memo) <= n): kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n): return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0): gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n): gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if n == r: return 1
  if n < r or r < 0: return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1: arr.append([temp, 1])
  if arr==[]: arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum


def gcd(a, b):
    while b: a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n-1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n: return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

def base_10_to_n_without_0(X, n):
  X -= 1
  if X//n: return base_10_to_n_without_0(X//n, n)+[X%n]
  return [X%n]


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count





S = S()

if S[0] == S[1] == S[2] == "R":
  print(3)
elif S[0] == S[1] == "R" or S[1] == S[2] == "R":
  print(2)
elif "R" in S:
  print(1)
else:
  print(0)

Solution (Python):
S = input().strip()
print(max(len(s) for s in S.split("S")))

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)
import math
from math import gcd
def lcm(a, b): return a * b // gcd(a, b)
from itertools import count, permutations, chain, product
from functools import lru_cache
from collections import deque, defaultdict
from operator import itemgetter
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok

def get_inv(n, modp):
    return pow(n, modp-2, modp)

def factorials_list(n, modp):    
    fs = [1]
    for i in range(1, n+1):
        fs.append(fs[-1] * i % modp)
    return fs

def invs_list(n, fs, modp):     
    invs = [get_inv(fs[-1], modp)]
    for i in range(n, 1-1, -1):
        invs.append(invs[-1] * i % modp)
    invs.reverse()
    return invs

def comb(n, k, modp):
    num = 1
    for i in range(n, n-k, -1):
        num = num * i % modp
    den = 1
    for i in range(2, k+1):
        den = den * i % modp
    return num * get_inv(den, modp) % modp

def comb_from_list(n, k, modp, fs, invs):
    return fs[n] * invs[n-k] * invs[k] % modp



class UnionFindEx:
    def __init__(self, size):
        
        self.roots = [-1] * size
    def getRootID(self, i):
        r = self.roots[i]
        if r < 0:   
            return i
        else:
            r = self.getRootID(r)
            self.roots[i] = r
            return r
    def getGroupSize(self, i):
        return -self.roots[self.getRootID(i)]
    def connect(self, i, j):
        r1, r2 = self.getRootID(i), self.getRootID(j)
        if r1 == r2:
            return False
        if self.getGroupSize(r1) < self.getGroupSize(r2):
            r1, r2 = r2, r1
        self.roots[r1] += self.roots[r2]    
        self.roots[r2] = r1
        return True

Yes = 'Yes'
No = 'No'



def main():
    S = input()
    if S == 'RSR':
        print(1)
    else:
        print(S.count('R'))







main()

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

S = input()
succ = 0
ans = 0
for ch in S:
    if ch == 'R':
        succ += 1
        ans = max(ans, succ)
    else:
        succ = 0
ans = max(ans, succ)
print(ans)

Solution (Python):
s = input()

if s == 'RSR':
  print (1)
else:
  print (s.count('R'))

Solution (Python):
S = input()

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

Solution (Python):
s = input()

i = 0
ans = 0
for c in s:
    if c == 'R':
        i += 1
    else:
        i = 0
    ans = max(ans, i)

print(ans)

Solution (Python):
l=input()
from itertools import groupby as gb
var=[(a,len(list(b))) for a,b in gb(l)]
ans=0
for k,v in var:
    if k=="R":ans=max(ans,v)
print(ans)

Solution (Python):
s=input()
ans=0
if 'R' in s:
    ans=1
if 'RR' in s:
    ans=2
if 'RRR' in s:
    ans=3
print(ans)

Solution (Python):
S = input()
RC = S.count('R')
if S[1] == 'S' and RC == 2:
    print(1)
else:
    print(RC)

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

Solution (Python):
s = input()
if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
s = input().rstrip()
x = 0
for i in range(len(s)):
    if s[i] == 'R':
        x += 1
    elif x > 0:
        print(x)
        exit(0)
print(x)

Solution (Python):
S = input().rstrip()

ans = 0
cur = 0
for s in S:
    if s == 'R':
        cur += 1
        if cur > ans:
            ans = cur
    else:
        cur = 0

print(ans)

Solution (Python):
s = input()
if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
s = input()

if s[1] == "R":
  print(s.count("R"))
else:
  if "R" in s:
    print(1)
  else:
    print(0)

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

Solution (Python):
import sys
sys.setrecursionlimit(10**7) 
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right

from collections import deque, defaultdict


from collections import Counter

from itertools import accumulate,combinations,permutations,product

from heapq import heapify,heappop,heappush

from functools import reduce,lru_cache

from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def binr(x): return bin(x)[2:]
def bitcount(x): 
    x= x - ((x >> 1) & 0x5555555555555555)
    x= (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x= (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f 
    x+= (x >> 8); x+= (x >> 16); x+= (x >> 32) 
    return x & 0x7f

def main():
    mod = 1000000007
    

    
    
    
    
    

    s=input()
    ans=0
    cnt=0
    for i in range(3):
        si=s[i]
        if si=="S":
            cnt=0
        else:
            cnt+=1
            ans=max(ans,cnt)
    print(ans)





if __name__ == "__main__":
    main()

Solution (Python):
s = input()
if s=='RRR':
    print(3)
elif s=='RRS' or s=='SRR':
    print(2)
elif s=='SSS':
    print(0)
else:
    print(1)

Solution (Python):
S = input()
ans = 0
if S.count("R") > 0:
	ans = 1
if S.count("RR") > 0:
	ans = 2
if S.count("RRR") > 0:
	ans = 3
print(ans)

Solution (Python):
s = str(input())
if s in ["SSS"]:
  print(0)
  exit()
if s in ["RRR"]:
  print(3)
  exit()
if s in ["SRR","RRS"]:
  print(2)
  exit()
print(1)

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

Solution (Python):
s=input()
if s[1]=="S":
    print(min(s.count("R"),1))
else:
    print(s.count("R"))

Solution (Python):
s = input()

if s == 'RRR':
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
s = input()
if "RRR" in s:
    print(3)
elif "RR" in s:
    print(2)
elif "R" in s:
    print(1)
else:
    print(0)

Solution (Python):
x = input()

ans = 0
tmp = 0
for c in x:
    if c == 'R':
        tmp += 1
        ans = max(ans, tmp)
    else:
        tmp = 0
print(ans)

Solution (Python):
import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 1000000007
sys.setrecursionlimit(1000000)

S = rs()

ans = 0
cnt = 0
for c in S:
	if c == 'R':
		cnt += 1
	else:
		cnt = 0
	ans = max(ans, cnt)
print(ans)

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    S = readline().strip()
    
    if S.count('R') in (0, 1, 3):
        print(S.count('R'))
    elif S[0] == S[2]:
        print(1)
    else:
        print(2)
        
    
    return


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    S = input()
    if S == 'RRR':
        return 3
    elif 'RR' in S:
        return 2
    elif 'R' in S:
        return 1
    return 0
print(main())

Solution (Python):
S = input()

if 'RRR' in S:
    print(3)
elif 'RR' in S:
    print(2)
elif 'R' in S:
    print(1)
else:
    print(0)

Solution (Python):
s=input()
ans=0
cnt=0

for c in s:
    if c=="R":
        cnt+=1
        ans=max(cnt,ans)
    else:
        cnt=0
print(ans)

Solution (Python):
s = input()
if s == "RRR":
    print(3)
elif s == "SSS":
    print(0)
elif s == "RRS" or s == "SRR":
    print(2)
else:
    print(1)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def main():
    S = input()
    cnt = 0
    ans = 0
    for c in S:
        if c == 'R':
            cnt += 1
        else:
            ans = max(ans, cnt)
            cnt = 0
    print(max(ans, cnt))


if __name__ == "__main__":
    main()

Solution (Python):
S = input()
if 'RRR' == S:
    print(3)
elif 'RR' in S:
    print(2)
elif 'R' in S:
    print(1)
else:
    print(0)

Solution (Python):
S = input()
cnt = 0
ans = 0
for i in range(3):
    if S[i] == 'R':
        cnt += 1
    else:
        cnt = 0
    ans = max(ans, cnt)

print(ans)

Solution (Python):
s = input()
if s == 'RSR':
  print(1)
else:
  print(s.count('R'))

Solution (Python):
s=input()
if s.count('R')<2 or s.count('R')==3:
    print(s.count('R'))
else:
    print(1 if s=='RSR' else 2)

Solution (Python):
s = input()
cur = 0
l = []
for i in range(len(s)):
    if s[i] == "R":
        cur += 1
    else:
        l.append(cur)
        cur = 0
l.append(cur)
print(max(l))

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

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


if __name__ == '__main__':
    main()

Solution (Python):
s=input()
if s=='RRR':print(3)
elif s=='RRS'or s=='SRR':print(2)
elif s.count('R'):print(1)
else:print(0)

Solution (Python):
s = input()
if s == 'RRR':
    ans = 3
elif s in ('RRS', 'SRR'):
    ans = 2
elif 'R' in s:
    ans = 1
else:
    ans = 0
print(ans)

Solution (Python):
s = input()
if s == 'RRR':
    res = 3
elif s == 'RRS' or s == 'SRR':
    res = 2
elif s == 'SSS':
    res = 0
else:
    res = 1
print(res)

Solution (Python):
S=input()
if S=="SSS":
  print(0)
elif S=="RSR" or S=="RSS" or S=="SRS" or S=="SSR":
  print(1)
elif S=="RRS" or S=="SRR":
  print(2)
else:
  print(3)

Solution (Python):
import sys
import itertools

import time
import math
import heapq
from collections import defaultdict
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines



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

Solution (Python):
S = input()

x = 0
cnt = 0
for s in S:
    if s == 'R':
        cnt += 1
    else:
        cnt = 0

    x = max(x, cnt)

print(x)

Solution (Python):
from itertools import groupby
S = input()
if 'RRR' in S:
    print(3)
elif 'RR' in S:
    print(2)
elif 'R' in S:
    print(1)
else:
    print(0)

Solution (Python):
S = input()
if 'RRR' in S:
    print(3)
elif 'RR' in S:
    print(2)
elif 'R' in S:
    print(1)
else:
    print(0)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

S = list(input())
cnt = 0
ans = 0
for s in S:
    if s=='R':
        cnt += 1
        ans = max(cnt, ans)
    else:
        cnt = 0
print(ans)

Solution (Python):
s=input()
ans=0
cnt=0
for i in range(3):
	if s[i]=="R":
		cnt+=1
		ans=max(ans,cnt)
	else:
		cnt=0
print(ans)

Solution (Python):
S = str(input())

if 'RRR' in S:
  print(3)
elif 'RR' in S:
  print(2)
elif 'R' in S:
  print(1)
else:
  print(0)

Solution (Python):
s=input()

if "RRR" in s:
    print(3)
elif "RR" in s:
    print(2)
elif "R" in s:
    print(1)
else:
    print(0)

Solution (Python):
s = input()

if "RRR" in s:
    print(3)
elif "RR" in s:
    print(2)
elif "R" in s:
    print(1)
else:
    print(0)

Solution (Python):
s = input()
ans = s.count("R")
if ans == 2 and s == "RSR":
    ans = 1
print(ans)

Solution (Python):

import sys;input = sys.stdin.readline
inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]

s = input().strip()
if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
from itertools import*
d = [len(list(l)) for k, l in groupby(input()) if k == "R"]
print(max(d) if d else 0)

Solution (Python):
import sys
from collections import defaultdict, Counter, namedtuple, deque
import itertools
import functools
import bisect
import heapq
import math
import copy


MOD = 10 ** 9 + 7



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