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: Wrong Answer

Solution code:
a=input()
T=0
for i in range(2):
  if a[i]=='R':
    T+=1
print(T)

Submission status: Wrong Answer

Solution code:
S=input()

if S=="RRR":
    print(3)

if S.count("RR")==1:
    print(2)

else:
    print(S.count("RR"))

Submission status: Wrong Answer

Solution code:
s=input()
if s.count("S")==0:
    print(0)
elif s.count("S")==1:
    print(1)
elif s.count("S")==3:
    print(3)
else:
    if s[1]=="S":
        print(2)
    else:
        print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

cnt = 1
for i in range(len(S)-1):
    if S[i] == S[i+1] and S[i] == "R":
        cnt += 2
    elif S[i] != S[i+1] and S[i+1] == "R":
        cnt += 1
    else:
        cnt = 0
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
tenki = list(input())
ans = 0
max_ans = 0
for i in tenki:
  if i == "R":
    ans = ans + 1
    flag = 0
  else:
    flag = 1
  if flag == 1:
    max_ans = ans
    ans = 0 
if max_ans > ans:
  print(max_ans)
else:
  print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()
if n[:2] == "RR" or n[2:] == "RR":
    print("2")
elif n == "RRR":
    print("3")
else:
    print("0")

Submission status: Wrong Answer

Solution code:
x = input()
if x == 'SSS':
  print(0)
elif 'SS' in x:
  print(1)
elif 'RRR' in x:
  print(3)
elif 'SRS' in x:
  print(1)
else:
  print(2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A = input()
if 'R' not in A:
    print(0)
elif 'S' not in A:
    print(3)
elif 'RR' in A:
    print(2)
elif 'SS' in A:
    print(1)

Submission status: Wrong Answer

Solution code:
S = input()
cnt = 0


for i in S:
    if i == "R":
        cnt += 1
    else:
        cnt = 0


print(cnt)

Submission status: Wrong Answer

Solution code:
s = input()
maxCount = 0
count = 0

for i in s:
  if(i == 'r'):
    count += 1
  else:
    maxCount = max(count, maxCount)
    count = 0
    
print(maxCount)

Submission status: Wrong Answer

Solution code:
S = input()

ren = 0

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

Submission status: Wrong Answer

Solution code:
S=input()
if S=="RSR":
    print(2)
else:
    
    print(len(S.replace("S","")))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
s = list(S)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
rs = stdin.readline
ri = lambda : int(rs())
ril = lambda : list(map(int, rs().split()))

def main():
    s = rs()
    ans = 2 if "RR" in s else 1 if "R" in s else 0
    print(ans)    

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

if S == 'RRR':
    print(3)
elif S == 'RSR' or S=='SSR' or S=='RSS':
    print(1)
elif S == 'RRS' or S=='SRR':
    print(2)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
S = list(input())

if S == "RSR":
    ans = 1
else:
    ans = S.count("R")

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X=str(input())
if X=='RRR':
    print(3)
elif X=='RRS' or X=='SRR':
    print(2)
elif X=='SSS':
    print(0)

Submission status: Wrong Answer

Solution code:
s=input()
flg = 0
cnt = 0
if s == "SSS":
    print(0)
    exit()
if s[1] == "R":
    flg = 1
for i in range(3):
    if s[i] == "R":
        cnt += 1
print(cnt if flg == 1 else cnt -1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# 標準入力を取得
S = input()

# 求解処理
ans = 0
if S == "RRR":
    ans = 3
elif (S == "RRS") or (S == "SRR"):
    ans = 2
elif (S == "RSR") or (S == "SSR") or (S == "SRS") or (S == "SSR"):
    ans = 1
else:
    ans = 0

# 結果出力
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=list(input())
n=0
for i in range(3):
    if S[i]=='R':
        n+=1
    elif n==2:
        pass
    else:
        n=0
print(n)

Submission status: Wrong Answer

Solution code:
s = input()
a = 0
for i in range(3):
    if s[i] == 'R':
        a += 1
    else:
        a = 0
print(a)

Submission status: Wrong Answer

Solution code:
a = input()
if a[0] == "R":
    if a[1] == "R":
        if a[2] == "R":
            print("3")
        else:
            print("2")
    else:
        print("0")
elif a[1] == "R":
    if a[2] == "R":
        print("2")
    else:
        print("0")
else:
    print("0")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
cur = 0
ans = 0
for i in range(len(S)):
    if S[i] == "R":
        cur += 1
    else:
        ans = max(ans, cur)
        cur = 0
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    s = input()
    count = 0
    ans = 0

    for i in s:
        if i == 'R':
            count += 1
            ans = count
        else:
            ans = count
            count = 0

    print(ans)
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S = input('').split()

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = str(input())

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
s = list(input())

if s[0] == 'R':
  if s[1] != 'R':
    print(1)
  else:
    if s[2] == 'R':
      print(3)
    else:
      print(2)
else:
  if 'R' not in s:
    print(0)
  elif s == ['R', 'R']:
    print(2)
  else:
    print(1)

Submission status: Wrong Answer

Solution code:
S = input()
ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
count = 0
cur = ''
ma = 0
for i in range(3):
    if s[i] == cur:
        count += 1
    else:
        cur = s[i]
        ma = max(count, ma)
        count = 1

ma = max(count, ma)
print(ma)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = str(input())

old = 0
renzoku = 0
for i in range(3):
    now = S[i]
    if i == 0 and now == 'R':
        renzoku += 1
    elif old == 'R' and now == 'R':
        renzoku += 1
    old = now

print(renzoku)

Submission status: Wrong Answer

Solution code:
S = input()
ans = 0

for i in range(2):
    if S[i] == 'R':
        ans = max(ans,1)
        if S[i + 1] == 'R':
            ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

s = input()
if s[1] == 'R':
    print(s.count('R'))
else:
    if s[0] == 'R' and s[2] == 'R':
        print(2)
    elif s[0] == 'S' and s[2] == 'S':
        print(0)
    else:
        print(1)

Submission status: Wrong Answer

Solution code:
s=input()
l=list(s)
c=0
for i in range(len(l)):
  if l[i]=='S':
    c=0
  else:
    c+=1
print(c)

Submission status: Wrong Answer

Solution code:
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 s=="SSR" or s=="SRS" or s=="RSS":
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
s = input()
ans = 1
if s[0] == 'R' and s[1] == 'R':
    ans = 2
if s[2] == 'R' and s[1] == 'R':
    ans = 2
if s[0] == 'R' and s[1] == 'R' and s[2] == 'R':
    ans = 3
print(ans)

Submission status: Wrong Answer

Solution code:
nums=str(input())
if nums=="RRS" or nums=="SRR":
    print(2)
elif nums=="SSS":
    print(0)
else:
    print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#A
import sys
s = input()

num = s.count("R")

if num >= 2:
    if s[1] == "R":
        num = 1

print(num)

Submission status: Wrong Answer

Solution code:
s = input()
c = 0
for i in range(3):
    if i == 0:
        if s[i] == 'R':
            c += 1
    else:
        if s[i] == 'R' and s[i-1]=='R':
            c +=1

print(c)

Submission status: Wrong Answer

Solution code:
S= input()

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

Submission status: Wrong Answer

Solution code:
s = input()
cnt=0
for i in range(3):
    if s[i]=='R':
        cnt+=1
if cnt==0:
    print(cnt)
elif cnt==3:
    print(cnt)
elif cnt==2:
    if s[1]=='S':
        print(cnt-1)
    else:
        print(cnt)

Submission status: Wrong Answer

Solution code:
s = str(input())
ans = 0
if(s[0]=="R"):
  if(s[1]=="R"):
    if(s[2]=="R"):
      ans = 3
    else:
      ans = 2
  else:
    ans = 1
else:
  if(s[1]=="R"):
    if(s[2]=="R"):
      ans = 2
    else:
      ans = 1
  else:
    ans = 0

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
from collections import Counter

a = list(input())
print(a.count('R'))

Submission status: Wrong Answer

Solution code:
s = list(input())

if s[0]=='R':
  if s[1]=='R':
    if s[2]=='R':
      print(3)
      exit()
    else:
      print(2)
      exit()
  else:
    print(1)
    exit()
else:
  if s[1]=='R':
    if s[2]=='R':
      print(2)
      exit()
    else:
      print(1)
      exit()
  else:
    print(1)
    exit()
print(0)

Submission status: Wrong Answer

Solution code:
S = input()

if S == 'RRR':
    print(3)
elif S == 'RSR' or 'SSR' or 'RSS':
    print(1)
elif S == 'RRS' or S=='SRR':
    print(2)
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

S = str(input())
cnt = 0
cnt1 = 0
for i in range(len(S)):
    if S[i] == "R":
        cnt += 1
    if S[i] == "S":
        cnt1 = cnt
        cnt = 0 
if cnt > cnt1:
    print(cnt)
else:
    print(cnt1)

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

if s.count('R') >= 2:
    if s [1] == 'S':
        print(1)
    else:
        print(s.count('R'))

else:
    print(0)

Submission status: Wrong Answer

Solution code:
s=input()

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

Submission status: Wrong Answer

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

if S[1] == 'S':
    if S[0] == 'R' or S[1] == 'R':
        print(1)
        exit()
    else:
        print(0)
        exit()

if S[0] == 'R' or S[1] == 'R':
    print(2)
    exit()

print(1)

Submission status: Wrong Answer

Solution code:
S=list(input())
a,b=0,0
for i in S:
    if i=="R":
        a+=1
    else:
        if a>b:
            b=a
        a=0
print(b)

Submission status: Wrong Answer

Solution code:
s=input()
j=0
if(s[0]!='R'):
    j=j+1
c=0
while(len(s)>j and s[j]=='R' ):
    c=c+1
    j=j+1
print(c)

Submission status: Wrong Answer

Solution code:
a = input()
b = 0
c = 0
for i in a:
    c += 1
    if i == "R" and c == 1:
        b += 1
    elif i == "R" and c == 2 and b == 1:
        b += 1
    elif i == "R" and c == 3 and b == 2:
        b += 1
print(b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

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)
print(s)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    S = input()
    
    cnt = 0
    ans = 0
    for s in S:
        if s=='R':
            cnt += 1
        else:
            ans = max(ans, cnt)
            cnt = 0

    
    print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
w=input()
count=0

for i in range(len(w)):
 if w[i]=="R":
  count+=1
 if w[i]=="S":
  if i==1:
    count=0

print(count)

Submission status: Wrong Answer

Solution code:
S = input("R or S:")
s = list(S)

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

Submission status: Wrong Answer

Solution code:
s=input()

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

Submission status: Wrong Answer

Solution code:
weatherList = list(input())
count = 0;

for i in range(len(weatherList)):
  if weatherList[i] == "R":
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

S = s()
if 'S' not in S:
    ans = 3
if 'R' not in S:
    ans = 0
else:
    ans = 1
for i in range(2):
    if S[i] == S[i+1] == 'R' and ans != 3:
        ans = 2
print(ans)

Submission status: Wrong Answer

Solution code:
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: Wrong Answer

Solution code:
S = input()
cnt = 0
ma = 0
for i in range(3):
    if S[i]=='R':
        cnt+=1
    else:
        ma=cnt
        cnt=0
if cnt==3:
    print(cnt)
else:
    print(ma)

Submission status: Wrong Answer

Solution code:
S = str(input())
a = 0
w = 0
for i in range(len(S)):
    if S[i] == 'R':
        w = w + 1
    else:
        if (w > a):
          a = w
        w = 0
print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0
if s[0]  == "R":
    ans += 1
    if s[1] == "R":
        ans += 1
        if s[2] == "R":
            ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import glob

class InputGenerator(object):
    def __init__(self, input_path=None):
        if input_path != None:
            self.g = self.input_generator(input_path)
        else:
            self.g = None

    def input_generator(self, input_path):
        with open(input_path) as f:
            for line in f:
                yield line

    def get_input(self):
        if self.g == None:
            return input()
        else:
            return next(self.g)

def solve(gen):
    l = gen.get_input().rstrip()
    num_days = 0
    num_days_max = 0
    for s in l:
        if s == 'R':
            num_days += 1
        else:
            if num_days > num_days_max:
                num_days_max = num_days
            num_days = 0
    print(num_days_max)

if __name__ == '__main__':
    test_flag = len(sys.argv) > 1

    if test_flag == True:
        file_path_list = sorted(glob.glob('test/*'))
    else:
        file_path_list = [None]

    for file_path in file_path_list:
        gen = InputGenerator(file_path)
        solve(gen)

Submission status: Wrong Answer

Solution code:
s=input()

ans=0
if s[0]=="R":
    ans+=1
    if s[1]=="R":
        ans+=1
        if s[2]=="R":
            ans+=1

anss=0
if s[1]=="R":
    anss+=1
    if s[2]=="R":
        anss+=1

if ans<anss:
    print(anss)
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
from math import *
import sys,bisect,copyreg,copy,statistics,os
def inp(): return sys.stdin.readline().strip()
def IIX(): return (int(x) for x in sys.stdin.readline().split())
def II(): return (int(inp()))
def LI(): return list(map(int, inp().split()))
def LS(): return list(map(str, inp().split()))
def L(x):return list(x)
def out(var): return sys.stdout.write(str(var))
def binary_search(arr, x): 
    left = 0
    right = len(arr) - 1
    mid = 0
    while left <= right:   
        mid = (left + left) // 2
        if arr[mid] < x: 
            left = mid + 1
        elif arr[mid] > x: 
            right = mid - 1
        else: 
            return mid
    return -1

s=inp()
con=0
if s[0] =='R' and s[1]=='R' and s[2]=='R':
    out(3)
elif s[0] =='R' and s[1]=='R':
    out(2)
else:
    out(0)

Submission status: Wrong Answer

Solution code:
i = 0
for s in input():
    if s == "R":
        i += 1

print(i)

Submission status: Wrong Answer

Solution code:
a=input()

if a == "RRR":
  answer=2
elif a=="RRS" or a=="SRR":
  answer=1
else:
  answer=0
  
print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print(input().count("S"))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
string = input()
count = 0
max_count = 0
for s in string:
    if s == 'R':
        count += 1
    else:
        if count > max_count:
            max_count = count
        count = 0

print(max_count)

Submission status: Wrong Answer

Solution code:
s=input()
ans=1
for i in range(1,4):
	if s.count("R"*i):
		ans=max(ans,i)
	if s.count("S"*i):
		ans=max(ans,i)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
ans = 0
r = 0
for c in S:
    if c == 'R':
        r += 1
    else:
        ans = max(ans, r)
        r = 0
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = input()
o = 0
for i in range(2):
  if a[i] == a[i + 1]:
    o += 1
print(o)

Submission status: Wrong Answer

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

    if s[0] == s[1] == s[2] == "R":
        print(3)
        return
    if s[0] == "R" or s[1] == "R" or s[2] == "R":
        print(1)
        return
    
    if s[0] == s[1] == s[2] == "S":
        print(0)
        return

main()

Submission status: Wrong Answer

Solution code:
s=input()
t=1
k=0
n=len(s)
ans=0
if s[0]=="R":
    ans=1
    k=1
    t=0
for i in range(1,n):
    if t==0 and s[i]=='R':
        k+=1
        ans=max(ans,k)
    elif s[i]!="R":
        t=1
        k=0
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()

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

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    S = input()
    S = list(S)

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def solve():
    return

if __name__=='__main__':
    s = S()
    if s=="RRR":
        print(3)
    elif s=="RRS" or "SRR":
        print(2)
    elif s=="SSS":
        print(0)
    else:
        print(1)
    solve()

Submission status: Wrong Answer

Solution code:
s = list(input())

if s[0]=='R':
  if s[1]=='R':
    if s[2]=='R':
      print(3)
      exit()
    else:
      print(2)
      exit()
  else:
    print(1)
    exit()
else:
  if s[1]=='R':
    if s[2]=='R':
      print(2)
      exit()
    else:
      print(1)
      exit()
print(0)

Submission status: Wrong Answer

Solution code:
word = input()

res = 0
count = 0
for s in word:
    if s == 'R':
        count += 1
    else:
        if res < count:
            res = count
        count = 0

print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    ans = 0

    if S == "RRR":
        ans = 3
    elif S == "RRS" or S == "SSR":
        ans = 2
    else:
        if S.count("R") != 0:
            ans = 1

    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
s = list(input())
box = []
cnt = 0
for i in s:
	if i == 'R':
		cnt += 1
	else:
		box.append(cnt)
box.append(cnt)
print(max(box))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)


S = input()

max_len = 0
count = 0
for i in range(2):
    if S[i] == 'R':
        count += 1
        max_len = max(max_len, count)
    if S[i] == 'S':
        count = 0

print(max_len)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

# A
import re
S = input()
m = re.findall("R", S)
print(len(m))

Submission status: Wrong Answer

Solution code:
s=str(input())
cnt=0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

if s[0] == "R" and s[1] =="R" and s[2] =="R":
  print(3)
elif s[0] == "R" and s[1] =="R":
  print(2)
elif s[1] == "R" and s[2] =="R":
  print(2)
elif s[1] == "R":
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
s=input()
cnt=0
for i in s:
	if i=="S":
		break
	cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
from re import search

s = input()

print(len(search(r'R*', s).group()))

Submission status: Wrong Answer

Solution code:
s=input()

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

Submission status: Wrong Answer

Solution code:
data = list(input())
count = 0
for i in data:
  if(i=='R'):
    count+=1
    
print(count)

Submission status: Wrong Answer

Solution code:

S=input()

cnt=0
max_cnt=0
for s in S:
    if(s=="R"):
        cnt+=1
    else:
        max_cnt=cnt
        cnt=0

if(S.count("R")==3):
    print(cnt)
else:
    print(max_cnt)

Submission status: Wrong Answer

Solution code:
S = input()
rains = []
rain = 0
for i in range(3):
  if S[i] == "R":
    rain += 1
  else:
    rains.append(rain)
    rain = 0
if rains == []:
  rains.append(rain)
print(max(rains))

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

s = input()
cnt = 0

if s[0] == 'R':
  cnt = 1
  if s[1] == 'R':
    cnt = 2
    if s[2] == 'R':
      cnt = 3
else:
  if s[1] == 'R':
    cnt = 1
    if s[2] == 'R':
      cnt = 2
      
print(cnt)

Submission status: Wrong Answer

Solution code:
S = input()

if S.count("RRR") <= 1:
  print("3")
elif S.count("RR") <= 1:
  print("2")
elif S.count("R") <= 1:
  print("1")
else:
  print("0")

Submission status: Wrong Answer

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

for i in s:
    if i == "R":
        cnt += 1
    else:
        ans = cnt
        cnt = 0

print(max(cnt,ans))

Submission status: Wrong Answer

Solution code:
#coding:utf-8

s = str(input())

ans = 0
prv = ""
pon = 0

for i in s:
    if pon == 0:
        prv = i
        if i == "R":
            ans += 1
        pon = 1
        continue
    if prv == "R" and i == 'R':
        ans += 1
    prv = i 

print("{}".format(ans))