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: Accepted

Solution code:
s=input()
 
if s in ["RRR"]:
  print(3)
elif s in ["RRS","SRR"]:
  print(2)
elif s in ["RSS","SRS","SSR","RSR"]:
  print(1)
else:
  print(0)

Submission status: Accepted

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


print(ans)

Submission status: Accepted

Solution code:
s = input()
cnt = 0
for x in range(2):
    if s[x] == 'R' and s[x+1] == 'R':
        cnt += 1

for x in s:
    if x == 'R':
        cnt += 1
        break

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

if (s == "RRR"):
    print(3)
elif (s[0] == s[1] == '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: Accepted

Solution code:
s = input()

if (s == "RRR"):
    print(3)
elif (s[0] == s[1] == '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: Accepted

Solution code:
A = list(input())

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

Submission status: Accepted

Solution code:
from sys import stdin


test = list(stdin.readline().rstrip())

count = [0,0,0]
i=0
before = 'R'

for str in test:
    if str=='R':
        count[i] += 1
    else:
        i = i + 1

print(max(count))

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
from bisect import bisect_left
from itertools import product
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def LF(): return list(map(float, input().split()))
def LC(): return [c for c in input().split()]
def LLI(n): return [LI() for _ in range(n)]
def NSTR(n): return [input() for _ in range(n)]

def array2d(N, M, initial=0):
    return [[initial]*M for _ in range(N)]

def copy2d(orig, N, M):
    ret = array2d(N, M)
    for i in range(N):
        for j in range(M):
            ret[i][j] = orig[i][j]
    return ret


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


def main():
    S = input()
    if S == "RRR":
        print(3)
    elif S == "RRS" or S == "SRR":
        print(2)
    elif S == "RSR":
        print(1)
    else:
        print(S.count("R"))
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s=input()

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

Submission status: Accepted

Solution code:
s = input()
cnt = 0

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

Submission status: Accepted

Solution code:
s = input()
s = s.split('S')
print(len(max(s)))

Submission status: Accepted

Solution code:
S = input()

tmp = 0
ans = 0
for i in range(len(S)):
    if S[i] == 'R':
        tmp += 1
        ans = max(ans, tmp)
    else:
        ans = max(ans, tmp)
        tmp = 0
print(ans)

Submission status: Accepted

Solution code:
S = input()

if S == 'RSS':
    print(1)
    exit()

tmp = 0
for i in range(len(S)):
    if S[i] == 'R':
        tmp += 1
    else:
        if i == 2:
            break
        else:
            tmp = 0
print(tmp)

Submission status: Accepted

Solution code:
a=input()

cnt=0

for i in a:
  if i=='R':
    cnt+=1

if cnt==2 and len(a)==3:
  if a[0]=='R' and a[2]=='R':
    cnt=1

print(cnt)

Submission status: Accepted

Solution code:
s = input()
count = 0
for i in range(len(s)):
  if s[i] == "R":
    count += 1
    if i + 1 >= 3:
      break
    elif s[i+1] == "S":
      break
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    # 文字列の入力
    sr = input()

    rc_cnt = 0
    rc_ans = 0

    for s in sr:
        if (s == 'S'):
            rc_cnt = 0
        elif (s == 'R'):
            rc_cnt = rc_cnt + 1
            if (rc_cnt > rc_ans):
                rc_ans = rc_cnt
    
    print(rc_ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = max(input().split("S"))
print(len(a))

Submission status: Accepted

Solution code:
print(len(max(input().split("S"))))

Submission status: Accepted

Solution code:
w = input()

if w.count("R") == 2:
    if w[1] == "R":
        print(2)
    else:
        print(1)

else:
    print(w.count("R"))

Submission status: Accepted

Solution code:
s = input()
count = 0
result = 0
for c in s:
    if c == 'R':
        count+=1
        result = max(count, result)
    else:
        count = 0

print(result)

Submission status: Accepted

Solution code:
a = input()

if a == "RSR":
    print(1)
else :
    print(a.count("R"))

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(string):
    return str(max(map(len, string.split("S"))))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Accepted

Solution code:
inn = input()
numR = 0
for c in inn:
    if c == 'R':
        numR += 1
if numR != 2:
    print(numR)
else:
    print(1 if inn[1] == 'S' else 2)

Submission status: Accepted

Solution code:
from time import time
def timer(func):
    def f(*args, **kwargs):
        before = time()
        rv = func(*args, **kwargs)
        after = time()
        print('temps écoulé', after - before)
        return rv
    return f


def A(S): 
    nb = 0
    if S == 'RSR':
        print(1)
        exit
    else:
        for i in S:
            if i == 'R':
                nb = nb+1
        print(nb)


@timer
def B():
    ...

@timer
def C():
    ...


S = input()
A(S)

Submission status: Accepted

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

s = S()

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

if max < cnt:
    max = cnt

print(max)

Submission status: Accepted

Solution code:
def solve(s):
  if "RRR" in s:
    return 3
  elif "RR" in s:
    return 2
  elif "R" in s:
    return 1
  else:
    return 0
if __name__ == "__main__":
  s = input()
  print(solve(s))

Submission status: Accepted

Solution code:
N = input()
ans = 0
for i in range(1,4):
  p = "R"*i
  if p in N:
    ans = i
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(s):
    if "RRR" in s:
        return 3
    elif "RR" in s:
        return 2
    elif "R" in s:
        return 1
    else:
        return 0

if __name__ == "__main__":
    s = input()
    print(solve(s))

Submission status: Accepted

Solution code:
ss=str(input())
a=int(ss.count("R"))

if ss=="RSR":
  a=1

print(a)

Submission status: Accepted

Solution code:
# string
# a, b, c = input().split()
# str_list = list(input().split())

# number
# a, b, c = map(int, input().split())
# num_list = list(map(int, input().split()))

# lows
# str_list = [input() for _ in range(n)]

# many inputs
# num_list = []
# for i in range(n): num_list.append(list(map(int, input().split())))

s = input()
if s[0] == "R":
    if s[1] == "R":
        if s[2] == "R":
            print(3)
        else:
            print(2)
    else:
        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: Accepted

Solution code:
ss = str(input())
a = int(ss.count("R"))

if ss == "RSR":
  a = 1

print(a)

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
S = input()
 
if S.count("R") == 2 and S[1] != "R":
  print(1)
  
else:
  print(S.count("R"))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()[0:3]

i=S.count('RRR')
j=S.count('RR')
k=S.count('R')
l=S.count('RSR')

print(max(i,j,k-l))

Submission status: Accepted

Solution code:
S = input()
 
# 高々2^3=8通りなので、全て列挙すればよい
# RRR RRS SRR RSR RSS SRS SSR SSS
ans = 0
if S == 'RRR': ans = 3
elif S == 'SRR' or S == 'RRS': ans = 2
elif S == 'SSS': ans = 0
else: ans = 1
  
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
if s.count('R')==2 and s[1]!='R':
  print(1)
else:
  print(s.count('R'))

Submission status: Accepted

Solution code:
s = input() + '@'

lst = [1]*len(s)
for i in range(1,len(s)):
  if s[i] == s[i-1]:
    lst[i] = lst[i-1] + 1

ans = 0
for i in range(0,len(s)):
	if s[i] == 'R':
		ans = max(ans,lst[i])

print(ans)

Submission status: Accepted

Solution code:
import math
import collections
import fractions
import itertools
import functools
import operator
import bisect

def solve():
    r = input()
    if r == 'RRR':
        print(3)
    elif r == 'RRS' or r == 'SRR':
        print(2)
    elif r == 'RSR' or r == 'RSS' or r =='SSR' or r =='SRS':
        print(1)
    elif r == 'SSS':
        print(0)
    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

count = 0
max = 0

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

print(max)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3

s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = input()

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

Submission status: Accepted

Solution code:
weather = input()

if "R" not in weather:
    print(0)
elif weather.count("R") == 2 and weather[1:2] == "R":
    print(2)
elif weather.count("R") == 3:
    print(3)
else:
    print(1)

Submission status: Accepted

Solution code:
s = [x for x in input()]
count = 0
max_count = 0

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

Submission status: Accepted

Solution code:
s = input()
t = s.count('R')
if t == 2:
    if s[1] == 'R':
        print(2)
    else:
        print(1)
else:
    print(t)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
cnt = 0
if s[1] == 'S':
    if 'R' in s:
        cnt += 1
else:
    cnt += 1
    if s[0] == 'R':
        cnt += 1
    if s[2] == 'R':
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
#a問題(できなかった)
s = input()
p=s[0]=='R'
q=s[1]=='R'
r=s[2]=='R'

if p and q and r==True:
    print(3)
elif (p and q)or(q and r)==True:
    print(2)
elif p or q or r ==True:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
S = input().rstrip()
num = 0
mnum = 0
for c in S:
    if c == 'R':
        num += 1
    else:
        num = 0

    if mnum < num:
        mnum = num

print(mnum)

Submission status: Accepted

Solution code:
def main():
    S = input()
    count = 1
    if 'R' in S:
        for i in range(len(S)-1):
            if S[i] == S[i+1] == 'R':
                count += 1
        print(count)

    else:
        print(0)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
d = 0

if s == "RRR":
    d = 3
elif s in {"RRS", "SRR"}:
    d = 2
elif s in {"RSR", "RSS", "SSR", "SRS"}:
    d = 1
else:
    d = 0

print(d)

Submission status: Accepted

Solution code:
s=input()
num=s.count("R")

if num==2:
    if s=="RSR":
        ans=1
    else:
        ans=2
else:
    ans=num

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()
ans=0
if 'R' in S:
    ans+=1
    if S[0]=='R' and S[1]=='R':
        ans+=1
    if S[1]=='R' and S[2]=='R':
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
s = input()

ans = 0
if s == 'RRR':
    ans = 3
elif s == 'RRS' or s == 'SRR':
    ans = 2
elif s == 'SSS':
    ans = 0
else:
    ans = 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = str(input())
count = 0
if S == "RRS" or S == "SRR":
    print(2)
elif S == "RSR":
    print(1)
else:
    for i in range(0, 3):
        if S[i] == "R":
            count += 1
    print(count)

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
found = 0
ans = 0
if s[0] == 'R':
    ans+=1
    if s[1] == 'R':
        ans += 1
        if s[2] == 'R':
            ans += 1
elif s[1] == 'R':
    ans +=1
    if s[2] == 'R':
        ans+=1
elif s[2] == 'R':
    ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
r = 0
Tr = 0
for i in n:
    if i == "R":
        r += 1
        Tr = r
    elif i == "S":
        r = 0
print(Tr)

Submission status: Accepted

Solution code:
def rainyseason(S):
    days = 0
    max_days = 0
    flag = 0
    for i in range(len(S)):
        if S[i] == 'R':
            days += 1
            flag = 1
        elif S[i] == 'S' and flag == 1:
            if days > max_days:
                max_days = days
                days = 0
                flag = 0
    if days > max_days:
        max_days = days
    return max_days

if __name__ == '__main__':
    S =str(input())
    print(rainyseason(S))

Submission status: Accepted

Solution code:
S = input()
rain_d = 0
max_rain_d = 0
for s in S:
    if s == 'R':
        rain_d += 1
        max_rain_d = rain_d
    elif s == 'S':
        rain_d = 0
print(max_rain_d)

Submission status: Accepted

Solution code:
l = list(input())
a = False
b = False
c = False


if l[0] == 'R':
	a = True
if l[1] == 'R':
	b = True
if l[2] == 'R':
  	c = True
    
if a and b and c:
  	print(3)
elif (a and b) or (b and c):
  	print(2)
elif a or b or c:
  	print(1)
else:
  	print(0)

Submission status: Accepted

Solution code:
array=input()
r=0
checker=[]
for i in array:
	if i=='R':
		r+=1
	else:
		checker.append(r)
		r=0
checker.append(r)
print(max(checker))

Submission status: Accepted

Solution code:
s=input()
r1=s.count("R")
r2=s.count("RR")
r3=s.count("RRR")
if r3>0:
    print(3)
elif r2>0:
    print(2)
elif r1>0:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

if 'S' not in S:
    print("3")

elif 'R' not in S:
    print("0")

elif S == 'RSR':
    print("1")

elif S == 'RRS' or S == 'SRR':
    print("2")

else:
    print("1")

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l=input()
for i in range(4):
  if "R"*i in l:
    ans=i
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

if 'RSR' in S:
	print(1)
else:
	print(S.count("R"))

Submission status: Accepted

Solution code:
s = input()

if s.count('R') == 2:
    print(s.count('RR')+1)
else:
    print(s.count('R'))

Submission status: Accepted

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

print(max([len(i) for i in S]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=input()
count=0
maxi=0
flag=0
for i in range(len(n)):
	if n[i]=='R':
		count+=1
		flag=1
	else:
		maxi=max(count,maxi)
		flag=0
		count=0

if flag==0:
	print(maxi)
else:
	print(max(count,maxi))

Submission status: Accepted

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') or (S[1] == 'R' and S[2] == 'R'):
    print(2)
elif S[0] == 'R' or S[1] == 'R' or S[2] == 'R':
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
s = input()
s = s.split('S')
print(max([len(i) for i in s]))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

print(res)

Submission status: Accepted

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

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input())
q=0
if s[1]=="R":
    q=1
    if s[0]=="R":
        q+=1
    if s[2]=="R":
        q+=1
else:
    if s[0]=="S" and s[2]=="S":
        q=0
    else:
        q=1
print(q)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W = input()

def solve():
  if "RRR" in W:
    return 3
  elif "RR" in W:
    return 2
  elif "R" in W:
    return 1
  else:
    return 0
print(solve())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

if S=="SSS":
    print(0)

if S=="SSR" or S=="SRS" or S=="RSS" or S=="RSR":
    print(1)

if S=="RRS" or S=="SRR":
    print(2)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input().strip()
g = 0
ans = 0
if s[0] == 'R': g+=1
else: g = 0
ans = max(ans, g)
if s[1] == 'R': g+=1
else: g = 0
ans = max(ans, g)
if s[2] == 'R': g+=1  
else: g = 0
ans = max(ans, g)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
ans = 0
for i in range(1, 4):
  if 'R'*i in s:
    ans = len('R'*i)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
record = list(s)
n = 0
high_score = 0
yesterday = ' '
for today in record :
    if today == 'R':
        if yesterday == 'R' :
            n += 1
        else :
            n = 1
    if high_score < n :
        high_score = n
    yesterday = today
print(high_score)

Submission status: Accepted

Solution code:
s = input()
record = list(s)
n = 0
high_score = 0
yesterday = ' '
for today in record :
    ####### main
    if today == 'R':
        if yesterday == 'R' :
            n += 1
        else :
            n = 1
    ###### ato
    if high_score < n :
        high_score = n
    yesterday = today
print(high_score)

Submission status: Accepted

Solution code:
s = list(input())
cnt = 0
sv = 0
old = "*"
for i in s:
  if i == "R":
    if old == "R":
        cnt += 1
    else:
      cnt = 1
    if cnt > sv:
      sv = cnt
  old = i
print(sv)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())
cnt = 0
old = "*"
for i in range(len(s)):
  if s[i] == "R":
    if old == "R":
      cnt += 1
    else:
      cnt = 1
  old = s[i]
print(cnt)

Submission status: Accepted

Solution code:
S = list(input())

cnt = 0
for i, s in enumerate(S):
  if s == 'R' and cnt == 0:
    cnt +=  1
  elif s == 'R' and cnt >= 1 and S[i-1] == 'R':
    cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = str(input())
rain = "R"

def count_rain(S,Rain):
  if Rain in S:
    Rain += "R"
    count_rain(S,Rain)
  else:
    print(len(Rain)-1)
    
count_rain(S,rain)

Submission status: Accepted

Solution code:
s=input()

ans=0
num=0
for i in range(len(s)):

    if s[i] == 'R':

        num+=1

    else:
        num=0

    if num>ans:
        ans=num

print(ans)

Submission status: Accepted

Solution code:
# A - Rainy Season

S = str(input())

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

Submission status: Accepted

Solution code:
i = input()
m = 0
if("R" in i):m+=1
if("RR"in i):m+=1
if("RRR" in i):m+=1
print(m)

Submission status: Accepted

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

Submission status: Accepted

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

if x == 3:
    ans = 3
elif x == 2:
    if s[1] == 'S':
        ans = 1
    else:
        ans = 2
elif x == 1:
    ans = 1
else:
    ans = 0

print(ans)

Submission status: Accepted

Solution code:
S = input()

if S[0] == "S":
    if S[1] == "S":
        if S[2] == "S":
            print("0")
        else:
            print("1")
    else:
        if S[2] == "S":
            print("1")
        else:
            print("2")
else:
    if S[1] == "S":
        if S[2] == "S":
            print("1")
        else:
            print("1")
    else:
        if S[2] == "S":
            print("2")
        else:
            print("3")

Submission status: Accepted

Solution code:
s=input()
count=0
sa=0
for char in s:
    if char=='R':
        sa+=1
    else:
        sa=0
    count=max(sa,count)
print(count)

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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