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.



Sample input:
RRS


Sample output:
2

Submission status: Runtime Error

Solution code:
a=list(input().split())
if a[0]=="S" and a[0]==a[1] and a[1]==a[2]:
    print(0)
elif a[0]=="R" and a[0]==a[1] and a[1]==a[2]:
    print(3)
elif  for i in range(3):
        a[i]=="R" and a[i]==a[(i+1)%3] or a[i]==a[(i+2)%3]:
    print(2)
else: print(1)

Submission status: Runtime Error

Solution code:
a=list(input())
n=len(a)
cunt=0
for i in range(n-1):
	if a[i]=='R':
    	
        if a[i-1]==a[i]:
        	cunt+=1
print(cunt)

Submission status: Runtime Error

Solution code:
#coding :utf-8
S=input(">")
if (S==sss):
    print(3)
elif(S==ssr):
    print(2)
elif(S==srs):
    print(1)
elif(S==rss):
    print(1)
elif(S==srr):
    print(2)
elif(S==rsr):
    print(1)
elif(S==rrs):
    print(2)
else:
    print(0)

Submission status: Runtime Error

Solution code:
A = input()
if A == RRR
	print("3")
elif A == SSS
	print("0")
elif A == RRS
	print("2")
elif A == SRR
	print("2")
else 
	print("1")

Submission status: Runtime Error

Solution code:


L = []
L.append(input())

if L[0] == 'SSS':
	print(0)
elif L[0] == 'RRR':
	print(3)
elif L[0] == 'SSR' or L[0] == 'SRS':
	prinrt(1)
elif L[0] =='RSS':
	print(1)
elif L[0] == 'SRR' or L[0] == 'RRS':
	print(2)
elif L[0] == 'RSR':
	print(1)

Submission status: Runtime Error

Solution code:


s=input()
s=s.trim()
if s=="rrs" or s=="srr":
    print("2")
elif s=="rrr":
    print("3")
elif s=="sss":
    print('0')
else:
    print('1')

Submission status: Runtime Error

Solution code:
S=input()
distros = { c:1 for c in S }

for c in range(len(S)-1):
    if S[c] == S[c+1]:
        distros[S[c]] += 1

print(distros["R"])

Submission status: Runtime Error

Solution code:
n = 0
S = Input()
for i in range(0,len(S)):
    if i==0:
        if S[i]=="R":
            n += 1
    if i==1:
        if S[i]=="R":
            n += 1
        else:
            n = 0
    if i==2:
        if S[i]=="R":
            n += 1
        else:
            continue
print(n)

Submission status: Runtime Error

Solution code:
s = list(input())

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

pritn(ans)

Submission status: Runtime Error

Solution code:


L = []
L.append(input())

if L[0] == 'SSS':
	print(0)
elif L[0] == 'RRR':
	print(3)
elif L[0] == 'SSR' or L[0] == 'SRS' or L[0] == 'RSS':
	prinrt(1)
elif L[0] == 'SRR' or L[0] == 'RRS':
	print(2)
elif L[0] == 'RSR':
	print(1)

Submission status: Runtime Error

Solution code:
S = input()

if "RRR" in S:
    ans = 3

elif "RR" in S:
    ans = 2
    
elif "R" in S:
    ans = 1
    
print(ans)

Submission status: Runtime Error

Solution code:

s=input()
s=s.trim()
if s=="rrs" || s=="srr":
    print("2")
else if s=="rrr":
    print("3")
else if s=="sss":
    print('0')
else:
    print('1')

Submission status: Runtime Error

Solution code:
w=str(input())
if w==RRR:
    print(3)
elif w==SRR:
    print(2)
elif w==RRS:
    print(2)
elif w==RSR:
    print(1)
elif w==RSS:
    print(1)
elif w==SRS:
    print(1)
elif w==SSR:
    print(1)
else :
    print(0)

Submission status: Runtime Error

Solution code:
a=input()
def f(a):
    if a=="RSR" or a=="SRS" or a=="SSR" or a=="RSS":
        return(1)
    if a=="RRS" or a=-"SRR":
        return(2)
    if a=="RRR":
        return(3)
    else :
        return(0)
print(f(a))

Submission status: Runtime Error

Solution code:
l = [e in e in input().split()]
c = 0
if l[1] == "R":
  c += 1
  if l[0] == "R":
    c += 1
  if l[2] == "R":
  	c += 1
else:
  if l[0] == 1 or l[2] == "R":
    c += 1

print(c)

Submission status: Runtime Error

Solution code:
a=input()
sum=0
for i in a:
  if i=='R'
  sum=sum+1
print (sum)

Submission status: Runtime Error

Solution code:
s=input()
i=0
c=0
if s[i]=='R':
  c=1
  if s[i+1]=='R':
    c=2
    if s[i+2]=='R':
      c=3
if s[i]=='S':
  c=0
  if s[i+1]=='R':
    c=1
   	if s[i+2]=='R':
      c=2
print(c)

Submission status: Runtime Error

Solution code:
a=list(input().split())
if a[0]="S" and a[0]=a[1] and a[1]=a[2]:
    print(0)
elif a[0]="R" and a[0]=a[1] and a[1]=a[2]:
    print(3)
elif  for i in range(3):
        a[i]="R" and a[i]=a[(i+1)%3] or a[i]=a[(i+2)%3]:
    print(2)
else: print(1)

Submission status: Runtime Error

Solution code:
a=input()
def f(a):
    if a=="RSR" or a=="SRS" or a=="SSR" or a=="RSS":
        return(1)
    else if a=="RRS" or a=-"SRR":
        return(2)
    else if a=="RRR":
        return(3)
    else :
        return(0)
print(f(a))

Submission status: Runtime Error

Solution code:
p = 0
q = 0
for i in range(len(S)):
    if S[i] != 'S':
        p += 1
        if p > q:
            q = p
    else:
      	p = 0
print(q)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
l=list(map(int,input().split()))
count=0
for i in range (n-2):
    for j in range (i+1,n-1):
        if l[i]==l[j]:
            continue
        l[i]+l[j]
        for k in range (j+1,n):
            if l[k]==l[i] or l[k]==l[l]:
                continue
            if l[k]<l[i]+l[j] and l[i]<l[j]+l[k] and l[j]<l[k]+l[i] :
                count+=1
print(count)

Submission status: Runtime Error

Solution code:
s = input()
count = 0
if 'RRR' in s:
  print(3)
elif 'RR' in s:
  print(2)
elif 'SSR' in s or 'SRS' in s or 'RSS' in sor 'RSR' in s:
  print(1)
else:
  print(0)

Submission status: Runtime Error

Solution code:
from collections import Counter

n = int(input())
l = list(map(int, input().split()))

l_counter = Counter(l)
l_set = sorted(list(l_counter.keys()))

length = len(l_set)
ans = 0
if n < 3:
    print(0)
else:
    for i in range(length - 2):
        for j in range(i + 1, length - 1):
            for k in range(j + 1, length):
                if l_set[k] < l_set[i] + l_set[j]:
                    ans += l_counter[l_set[i]] * l_counter[l_set[j]] * l_counter[l_set[k]]

    print(ans)

Submission status: Runtime Error

Solution code:
a=input()
if a=="RSR" or a=="SRS" or a=="SSR" or a=="RSS":
  print(1)
if a=="RRS" or a=-"SRR":
  print(2)
if a=="RRR":
  print(3)
else :
  print(0)

Submission status: Runtime Error

Solution code:
a=input()
if a=="RSR" or a=="SRS" or a=="SSR" or a=="RSS":
  print(1)
else if a=="RRS" or a=-"SRR":
  print(2)
else if a=="RRR":
  print(3)
else :
  print(0)

Submission status: Runtime Error

Solution code:
L = [s for s in input()]
if not 'R' in L:
  print(0)
elif not 'S' in L:
  print(3)
elif L[1] == 'S':
  if 'R' in L :
    print(1)
elif L[0] == 'S'
  print(1)
else:
  print(2)

Submission status: Runtime Error

Solution code:
a=input()
b=[]
for i in f:
  b.append(i)
cons=0
for j in b:
  if j=='R':
    cons=cons+1
print cons

Submission status: Runtime Error

Solution code:
import re

pattern = re.compile("R+")
print(len(re.search(pattern, input()).group(0)))

Submission status: Runtime Error

Solution code:
s = input()
count_arr = []
count = 0
for i in s:
    if i == "R": count += 1
    elif i == "S":
        count_arr.append(count)
        count = 0
print(max(count_arr))

Submission status: Runtime Error

Solution code:
s = str(input())
if s.count("R") = 3:
  print(3)
  elif s.count("R") = 2:
    print(2)
    elif s.count("R") = 1:
      print(1)
      else:
        print(0)

Submission status: Runtime Error

Solution code:
if S == RRR
	print("3")
elif S == SSS
	print("0")
elif S == RRS
	print("2")
elif S == SRR
	print("2")
else 
	print("1")

Submission status: Runtime Error

Solution code:
S = input()

if S =="SSS":
  print(0)
elif S[1] == "S":
  print(1)
elif S = "SRS":
  print(1)
elif S == "RRR":
  print(3)
else:
  print(2)

Submission status: Runtime Error

Solution code:
a = input()
l = a.split('S')
while("" in l):
   l.remove("")
print(len(l[0]))

Submission status: Runtime Error

Solution code:
a = input()
total = 0
for i in a[range(1,4)]:
  if i = 'R':
    total +=1
  else:
    total = 0

Submission status: Runtime Error

Solution code:
s = input()
count_arr = []
count = 0
for i in s:
    if i == "R": count += 1
    else:
        count_arr.append(count)
        count = 0
print(max(count_arr))

Submission status: Runtime Error

Solution code:
vi = 0
j = 0
for s in input():
    j += 1

    if s == "R":
        i += 1
    if j != 3 and i > 0 and s == "S":
        i -= 1

print(i)

Submission status: Runtime Error

Solution code:
if l == 'SSS':
	print(0)

elif l == 'SSR' or l == 'RSS' or l == 'SRS' or l == 'RSR':
	print(1)

elif l == 'SRR' or l == 'RRS':
	print(2)
  
elif l == 'RRR':
	print(3)

Submission status: Runtime Error

Solution code:
x,k,d=map(int,input().split())
if d>=x:
  print(x)
  exit()
else:
  if x//d>=k:
    print(x-k*d)
    exit()
  else:
    if (x//d)%2==k%2:
      print(x%d)
      exit()
    else:
      print(d-x%d)
      exit()

Submission status: Runtime Error

Solution code:
a = input()
total = 0
for i in a[range(1,4)]:
  if i = R:
    total +=1
  else:
    total = 0

Submission status: Runtime Error

Solution code:
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    S = ns()
    A = []
    ans = 0
    for s in S:
        if s == 'R':
            ans += 1
        else:
            A.append(ans)
            ans = 0
    print(max(A))


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
S = str(input())

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

Submission status: Runtime Error

Solution code:
S = input()
if S == RRR
	print("3")
elif S == SSS
	print("0")
elif S == RRS
	print("2")
elif S == SRR
	print("2")
else 
	print("1")

Submission status: Runtime Error

Solution code:
S = input()

R = []
r = 0
for s in S:
    if s == "R":
        r += 1
    if s == "S":
        R.append(r)
        r = 0

print(max(R))

Submission status: Runtime Error

Solution code:


L = []
 
for i in range(3):
	L.append(input())
 
    
c=0
ans=0
 
for i in range(3):
	if L[i] == 'R':
     		 if c != 0:
        			ans = 1
	else:
      		ans += 1

	if L[i] == 'S':
      		c += 1
      
print(ans)

Submission status: Runtime Error

Solution code:
import itertools

def chkTrg(a,b,c):
    if (a + b > c and b + c > a and c + a > b) and (a != b and b != c and c != a):
        return True
    else:
        return False

N = int(input())
bars = [int(i) for i in input().split(" ")]

cnt = 0

for bar in itertools.combinations(bars, 3):
    if chkTrg(bar[0],bar[1],bar[2]):
        cnt += 1

print(cnt)

Submission status: Runtime Error

Solution code:
s=input()

list = list(s)
cnt=0
if list(0) == 'R' and list(1) == 'R' and list(2)=='R':
    print(3)
elif list(0)=='R' and list(1) == 'R'and list(2)!='R':
    print(2)
elif list(0)=='R' and list(1) != 'R'and list(2)!='R':
    print(1)
elif list(0)=='R' and list(1) != 'R'and list(2)=='R':
    print(1)
elif list(0)!='R' and list(1) == 'R' and list(2)=='R':
    print(2)
elif list(0)!='R' and list(1) != 'R' and list(2)=='R':
    print(1)
elif list(0)!='R' and list(1) == 'R' and list(2)!='R':
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
def main():
    S = input()
    answer = solve(S)
    print(answer)


def solve(S):
    assert len(S) == 3
    assert all([x in ('S', 'R') for x in S])

    chain = []
    count = 0
    for i in range(len(S)):
        if S[i] == 'R':
            count += 1
        else:
            chain.append(count)

    return max(chain)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
a=input()
flag=False
ans=0
hold=0
for i in range(3):
    if a[i]=='R' and not flag:
        ans=1
        flag=not flag
        hold=max(hold,ans)

    elif a[i]=='R' and flag:
        ans+=1
        hold=max(hold,ans)

    else:
        ans=0
        flag=False


return(hold)

Submission status: Runtime Error

Solution code:
max = 0
for letter in S:
    if letter == "R":
        max += 1
    if letter == "S":
        break 
print(max)

Submission status: Runtime Error

Solution code:
a= input()
def f(s):
    if s[1]=="S" or s.count("S")=2:
        return(1)
    if s.count("S")==3:
        return (0)
    else return (2)
print(f(a))

Submission status: Runtime Error

Solution code:
temp = str(input())
count = 0
 
for i in temp:
  if i == 'R':
    count = count + 1
    max_count = count
  else:
    if max_count < count:
      max_count = count
    count = 0
    
print(max_count)

Submission status: Runtime Error

Solution code:
weather = input()

if weather = "RRR":
  print("3")
  
elif weather = "RRS" or weather = "SRR":
  print("2")
  
elif weather = "SSR" or weather = 'SRS' or weather = 'RSS':
  print("1")
  
else:
  print("0")

Submission status: Runtime Error

Solution code:
s=input()
if s=='RRR':
    print(3)
elif s=='RRS':
    print(2)
elif s=='RSR':
    print(1)
elif s=='SRR':
    pront(2)
elif s=='SSR':
    print(1)
elif s=='SRS':
    print(1)
elif s=='RSS':
    print(1)
elif s=='SSS':
    print(0)

Submission status: Runtime Error

Solution code:
def main():
    S = input()
    answer = solve(S)
    print(answer)


def solve(S):
    chain = []
    count = 0
    for i in range(len(S)):
        if S[i] == 'R':
            count += 1
        else:
            chain.append(count)

    return max(chain)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
A = list(map(input().split()))

cnt = A.conunt('R')
if cnt = 2:
  if A(2) == 'S':
    cnt =1

Submission status: Runtime Error

Solution code:
code = input()

if code == SSS:
    print(0)
elif code == SSR or SRS or RSS or RSR:
    print(1)
elif code == SRR or RRS:
    print(2)
else:
    print(3)

Submission status: Runtime Error

Solution code:
p = 0
for i in range(len(S)):
    if S[i] != 'S':
        p =+ 1
	else:
      	p == 0
print(p)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
str1=input()
ct=0
for i in range(0,3):
  if(str1[i]=='S')
  ct+=1
if(ct==0):
  print(3)
if(ct==3):
  print(0)
if(ct==2):
  print(1)
if(ct==1):
  if(str1[1]=='S'):
    print(1)
  else:
    print(2)

Submission status: Runtime Error

Solution code:
s=input()
if s=='RRR':
    print(3)
elif s=='RRS':
    print(2)
elif s=='RSR':
    print(1)
elif s=='SRR':
    pront(2)
elif s=='SSR':
    print(1)
elif s=='SRS':
    print(1)
elif s=='RSS':
    print(1)
elif s=='SSS':
    print(0)

Submission status: Runtime Error

Solution code:
text = input()
if text[1] == "S":
	if text[0] == "R" or text[2] == "R":
    	print(1)
    else:
        print(0)
else:
    if text[0] == "R" and text[2] == "R":
    	print(3)
    elif text[0] == "R" or text[2] == "R":
        print(2)

Submission status: Runtime Error

Solution code:
def main():
    s = input()
    c = 0
    if s[0] == s[1] == s[2] == "R":
            print(3)
        return
    if s[0] == s[1] == "R" or s[1] == s[2] == "R":
        print(2)
        return
    if s[0] == s[1] == s[2] == "S":
        print(0)
        return

    print(1)
    return

main()

Submission status: Runtime Error

Solution code:
def A(S):
    answer = 0

    if S[1] == 'R':
        answer += 1
        if S[0] == 'R':
            answer += 1
        if S[2] == 'R':
            answer += 1
    elif S[0] == 'R' or S[2] == 'R':
        answer = 1

    return answer

  
 print(A(input()))

Submission status: Runtime Error

Solution code:
def function(X):
    if X='SRS':
        return 1
    elif X[1] == 'S':
        if (X[0] == 'R') or (X[2] == 'R'):
            return 1
        else:
            return 0
    else:
        if (X[0] == 'R') and (X[2] == 'R'):
            return 3
        elif (X[0] == 'R') or (X[2] == 'R'):
            return 2
        else:
            return 0


if __name__ == '__main__':
    X = input()
    print(function(X))

Submission status: Runtime Error

Solution code:
L = []

for i in range(3):
	L.append(input())

    
c=0
ans=0

for i in range(3):
	if L[i] == 'R':
      if c !=0:
        ans = 1
      else:
      	ans += 1
    if L[i] == 'S':
      c += 1
      
print(ans)

Submission status: Runtime Error

Solution code:
S=list(input())
ans=0

for i in range(len(S)):
    if ans=0 and S[i]="R":
        ans=1
for i in range(len(S)-1):
    if S[i]=="R" and S[i+1]=="R":
        ans+=1

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
p = 0
for i in range(len(S)):
    if S[i] != 'S':
        p =+ 1
print(p)

Submission status: Runtime Error

Solution code:
    text = input()
    if text[1] == "S":
        if text[0] == "R" or text[2] == "R":
            print(1)
        else:
            print(0)
    else:
        if text[0] == "R" and text[2] == "R":
            print(3)
        elif text[0] == "R" or text[2] == "R":
            print(2)

Submission status: Runtime Error

Solution code:
s=I().strip()
arr=s.split("S")
ans=0
for i in arr:
    ans=max(ans,len(i))
print(ans)

Submission status: Runtime Error

Solution code:
temp = input()
return print(temp.count('R'))

Submission status: Runtime Error

Solution code:
Slist=list(input())
ans=0

for i in range(len(S)):
    if ans=0 and S[i]="R":
        ans=1
for i in range(len(S)-1):
    if S[i]=="R" and S[i+1]=="R":
        ans+=1

print(ans)

Submission status: Runtime Error

Solution code:
a = input()
if s == "SSS":
    print(0)
elif s == "SSR":
    print(1)
elif s == "SRS":
    print(1)
elif s == "SRR":
    print(2)
elif s == "RSS":
    print(1)
elif s == "RSR":
    print(1)
elif s == "RRS":
    print(2)
elif s == "RRR":
    print(3)

Submission status: Runtime Error

Solution code:
s=I().strip()
	arr=s.split("S")
	ans=0
	for i in arr:
		ans=max(ans,len(i))
	print(ans)

Submission status: Runtime Error

Solution code:
S = input()
if S == 'RSR':
    renzoku = 2
else:
    for si in S:
        if si == 'R':
            renzoku += 1

print(renzoku)

Submission status: Runtime Error

Solution code:
S = input()
count = 0
if S[0] == 'R':
  if S[1] == 'R':
    if S[2] == 'R':
      	print(3)
  	else:
    	print(2)
  else:
    if S[2] == 'R':
      print(1)
else:
  if S[1] == 'R':
    if S[2] == 'R':
      print(2)
    else:
      print(1)
  else:
    if S[2] == 'R':
      print(1)
    else:
      print(0)

Submission status: Runtime Error

Solution code:
a=input()
if a==SSS:
  print(0)
elif a=RRR:
  print(3)
elif a=RRS or a=SRR:
  print(2)
else:
  print(1)

Submission status: Runtime Error

Solution code:
s = input()

if s=="RRR":
  print(3)
elif s=="RRS" or s=="SRR":
  print(2)
elif s=="SSR" or s=="SRS" or s=="RSS" or s="RSR":
  print(1)
else:
  print(0)

Submission status: Runtime Error

Solution code:
if S=='SSS':
  print(0)
if S=='RSS' or S=='SRS' or S=='SSR' or S=='RSR':
  print(1)
if S=='RRS' or S=='SRR':
  print(2)
if S=='RRR':
  print(3)

Submission status: Runtime Error

Solution code:
a = input()
b = 0
if s == "SSS":
    print(0)
elif s == "SSR":
    print(1)
elif s == "SRS":
    print(1)
elif s == "SRR":
    print(2)
elif s == "RSS":
    print(1)
elif s == "RSR":
    print(1)
elif s == "RRS":
    print(2)
elif s == "RRR":
    print(3)

Submission status: Runtime Error

Solution code:
import sys
import bisect as bi
import math
from collections import defaultdict as dd
input=sys.stdin.readline
##sys.setrecursionlimit(10**7)
def cin():
    return map(int,sin().split())
def ain():            
    return list(map(int,sin().split()))
def sin():
    return input()
def inin():
    return int(input())
for _ in range(1):
    s=input().strip()
    p=s.index('R');n=len(s)
    ans=0
    if('R' in s):
        c=1
        for i in range(p+1,n):
            if(s[i]=='R'):
                c+=1
            else:
                ans=max(ans,c)
                c=0
        ans=max(ans,c)
    print(ans)

Submission status: Runtime Error

Solution code:
S = input()
counts = [0]
if "R" in S:
  counts.appned(1)
if "RR" in S:
  counts.append(2)
if "RRR" in S:
  counts.append(3)
print(max(counts))

Submission status: Runtime Error

Solution code:
S = input()
cnt = 0

for i in S:
    if i == 'R':
        cnt += 1
        cnt_max = cnt
    else:
        
        cnt = 0
print(cnt_max)

Submission status: Runtime Error

Solution code:
x = max(map(len,input().split(S)))
print(x)

Submission status: Runtime Error

Solution code:
S = input()
ans = 0
tmp = 0
preR = 0
if S == "SSS":
    print(0)
elif S == 'RSS' or S == 'SRS' or S == 'SSR' or S ==  'RSR'):
    print(1)
elif S == 'RRS' or S == 'SRR':
    print(2)
elif S == 'RRR':
    print(3)

Submission status: Runtime Error

Solution code:
S= input()

if S.count('RRR') == 1:
    print(3)
elif S.count('RR') == 1:
    print(2)
elif S.count('RSR') == 1 or S.count('RSS') == 1 or S.count('SRS') == 1 or S.count('SSR') == 1
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
S = input()
if S = 'SSS':
  a = 0
if S = 'SSR':
  a = 1
if S = 'SRS':
  a = 1
if S = 'SRR':
  a = 2
if S = 'RSS':
  a = 1
if S = 'RSR':
  a = 1
if S = 'RRS':
  a = 2
if S = 'RRR':
  a = 3
print(a)

Submission status: Runtime Error

Solution code:
strings = input()
lists = []
count = 0
for i in strings:
    if i == 'R':
        count += 1
    elif i == 'S':
        lists.append(count)
        count = 0
print(max(lists))

Submission status: Runtime Error

Solution code:
Slist=list(input())
if Slist=['S','S','S']:
  print(0)
elif Slist=['R','R','R']:
  print(3)
elif Slist=['R','R','S']:
  print(2)
elif Slist=['S','R','R']:
  print(2)
else:
  print(1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
if s == "RRR":
  print(3)
elif s == "RRS" or s == "SRR":
  print(2)
elif s == "RSR" or s == "RSS" or s == "SSR" or s == "SRS":
  print(1)
else:
  print(0)

Submission status: Runtime Error

Solution code:
temp = str(input())
count = 0
 
for i in temp:
  if i == 'R':
    count = count + 1
  else:
    max_count = count
    count = 0
    
print(max_count)

Submission status: Runtime Error

Solution code:
def main():
    tenki = input()
    leng = len(tenki)

    count = 0
    lst = []
    for i in range(leng):
        if tenki[i] == "R":
            count += 1
        else:
            lst.append(count)
            count = 0
    
    print(max(lst))


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
//if(strcmp(s[i],"AC")==0)
//if(s[l]=='#')
/*小文字判定
if((moji>= 'a') && (moji<='z')){
    printf("a\n");
    return 0;
  }
  */

int W_Length(char *str){
	int length = 0;
	while(*str++ != '\0')
		length++;
	return length;
}

void swap(int *a, int *b){
  int temp;
  temp=*a;
  *a=*b;
  *b=temp;
}
//swap(&a, &b)

double deg(double theta){//deg to theta
return theta*(2*3.14159265359)/360;
}

int cmp( const void *p, const void *q ) {
    return *(int*)p - *(int*)q;
}//ちいさい順
//qsort(a,n,sizeof(int),cmp);
//char s[n][11]

int cmp_s(const void * left, const void * right)
{
	char *left_char = (char *)left;
  char *right_char = (char *)right;
  return strcmp(left_char, right_char);
}
//qsort(s,n,sizeof(s[0]),cmp_s);


int main (void)
{
	int a[210000],b=0,c,n,i;
  char s[200005];

scanf("%s",s);
	for(i=0;i<3;i++){
      if(s[i]=='S'){
      continue;
      }
      if(s[i]=='R'&&b==0){
      b=1;
      }
      else if(s[i]=='R'&&s[i-1]=='R'){
      b++;
      }

	}
  
  printf("%d",b);
	
return 0;
}

Submission status: Runtime Error

Solution code:

#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>

using namespace std;
using ll = long long;
ll gcd(ll a, ll b);
int main(){
cin.tie(0);
string str;
ll result=0,temp=0;

cin>>str;

for(ll i=0;i<3;i++){
    if(str[i]=='R')temp++;
    else temp=0;
    if(temp>=result)result=temp;
}
cout<<result;
return 0;
}






ll gcd(ll a, ll b){

   if (a%b == 0)
   {
       return(b);
   }
   else
   {
       return(gcd(b, a%b));
   }

}

Submission status: Runtime Error

Solution code:
S = input()
cnt = 0

for i in S:
    if i == 'R':
        cnt += 1
    else:
        cnt_max = cnt
        cnt = 0
print(cnt_max)

Submission status: Runtime Error

Solution code:
s = input()

ans = s.index("S")

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = list(input())
count = 0
for w in S:
    if w == 'R':
        count += 1
    else:
        ans = count
        count = 0
print(ans) if count < ans else print(count)

Submission status: Runtime Error

Solution code:
a=s.count('R')
if a==0:
    print(a)
elif s[1]=='S':
    print(a-1)
else:
    print(a)

Submission status: Runtime Error

Solution code:
s＝input（）
ans＝0
c＝0
for i in range（3）:
  if s[i]＝＝'R':
    ans+＝1
  else:
    c＝max（ans,c）
    ans＝0
print（c）

Submission status: Runtime Error

Solution code:
s = raw_input()
ans = [0]
if(s.contains("R")):
	ans += [1]
if(s.contains("RR")):
  	ans += [2]
if(s.contains("RRR")):
	ans += [3]
println(max(ans))

Submission status: Runtime Error

Solution code:
s=input()
l=[]
for i in range(0,len(s)):
  if s[i]=='R':
    c=1
    p=i
    while True:
      if s[p+1]=='R':
        c=c+1
        p=p+1
      else:
        break
    l.append(c)
print(max(l))

Submission status: Runtime Error

Solution code:
s = str(input())
count = []
x = 0 
for i in range(len(s)):
    if s[i] == "R":
        x += 1
        if s[i] == len(s)-1:
            count.append(x)
    if s[i] == "S":
        count.append(x)
        x = 0

print(max(count))

Submission status: Runtime Error

Solution code:
s=input()
if s=='RRR':
    print(3)
elif s=='RRS':
    print(2)
elif s=='RSR':
    print(1)
elif s=='SRR':
    pront(2)
elif s=='SSR':
    print(1)
elif s=='SRS':
    print(1)
elif s=='RSS':
    print(1)
else :print(0)

Submission status: Runtime Error

Solution code:
S = input()
C = 0
l = []
for s in S:
  if s == "R":
    C += 1
  else:
    l.append(C)
    C = 0
print(max(l))

Submission status: Runtime Error

Solution code:
S = input()
if S == "RRR":
  print(0)
elif S == "SSS":
  print(3)
elif S == "SSR" or S = "RSS":
  print(2)
else:
  print(1)

Submission status: Runtime Error

Solution code:
stri=input()
count=0
l=[]
for i in stri:
    if i=="R":
        count+=1
    else:
        l.append(count) 
        count=0
print(max(l))

Submission status: Runtime Error

Solution code:
temp = str(input())
count = 0

for i in temp:
  if i == R:
    count = count + 1
  else:
    count = 0
    
print(count)

Submission status: Runtime Error

Solution code:
s = input()

if "RRR" in s:
    ans = 3
elif "RR" in s:
    ans = 2
elif "R" in s:
    ans = 1

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from sys import stdin,stdout
from collections import defaultdict
import math
#input=stdin.readline
#def print(x):stdout.write(str(x)+'\n')
for _ in range(int(input())):
    s=input()
    if s=='RRR':
        print(3)
    elif 'RR' in s:
        print(2)
    elif 'R' in s:
        print(1)
    else:
        print(0)

Submission status: Runtime Error

Solution code:
Slist=list(input())
if Slist=[SSS]:
  print(0)
elif Slist=[RRR]:
  print(3)
elif Slist=[RRS]:
  print(2)
elif Slist=[SRR]:
  print(2)
else:
  print(1)

Submission status: Runtime Error

Solution code:
s=input()
ans=0
flag=False
for i in a:
  if i=='R' and not flag:
    ans=1
    hold=ans
    
  if i=='R' and flag:
    ans+=1
    hold=ans
    
  else:
    ans=0
    flag=False
    
  return hold

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
if "R" in s:
  a = 1
  if "RR" in s:
    a += 1
    if "RRR" in s:
      a += 1
print(a)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
c = 0
m = 0
if s in S:
  if s == "R":
    c+=1
    m = max(c, m)
  else:
    m = max(c, m)
    c = 0
print(m)

Submission status: Runtime Error

Solution code:
word = input():
if word == 'SSS':
  print(0)
if word == 'SSR':
  print(1)
if word == 'SRS':
  print(1)
if word == 'RSS':
  print(1)
if word == 'SRR':
  print(2)
if word == 'RRS':
  print(2)
if word == 'RSR':
  print(1)
if word == 'RRR':
  print(3)

Submission status: Runtime Error

Solution code:
s = input()
if s == 'RRR': print(3)
elif s == 'RRS' print(2)
elif s == 'SRR': print(2)
else: print(1)

Submission status: Runtime Error

Solution code:
S=input()
ans=0
temp=0
for i in range(3):
    if S[i]=="R":
        temp+=1
    else:
        ans=temp
        temp=0
print(ans)
S=input()
ans=0
temp=0
for i in range(3):
    if S[i]=="R":
        temp+=1
    else:
        ans=temp
        temp=0
if ans<temp:
    ans=temp
print(ans)

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
#define ll long long
#define endl '\n'
#define pii pair<int,int>
#define IOS ios::sync_with_stdio(0); cin.tie(0);
#define fio freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define vll vector<long long int>
#define vpii vector<pair<int,int>>
#define dsc [](int a,int b)->bool {return a>b;}
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define MAX 1000000000000000000
#define test int t; cin>>t;
#define MOD 1000000007
#define all(x) (x).begin(),(x).end()

using namespace std;

ll nxt(){
    ll x;
    cin>>x;
    return x;
}

int main()
{
    #ifndef ONLINE_JUDGE
        fio
    #endif
    IOS

    string s;
    cin>>s;
    int res = 0;
    for(int i = 0; i<3; i++){
        if(s[i] == 'R'){
            int cnt = 0;
            for(int j = i; j<3; j++,i++){
                if(s[j] == 'R'){
                    cnt++;
                }
                else break;
            }
            res = max(res,cnt);
        }
    }

    cout<<res<<endl;

    return 0;
}