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

Solution (Python):
S = input()

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

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

elif "R" in S:
    print(1)

else:
    print(0)

Solution (Python):
r = list(input())
if r == ["R","S","R"] or r==["R","S","S"] or r==["S","S","R"] or r==["S","R","S"]:
  print(int(1))
elif r ==["R","R","S"] or r==["S","R","R"]:
  print(int(2))
elif r==["S","S","S"]:
  print(int(0))
else:
  print(int(3))

Solution (Python):
def inp():
    return input()
def iinp():
    return int(input())
def inps():
    return input().split()
def miinps():
    return map(int,input().split())
def linps():
    return list(input().split())
def lmiinps():
    return list(map(int,input().split()))
def lmiinpsf(n):
    return [list(map(int,input().split()))for _ in range(n)]

s = inp()

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

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

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

Solution (Python):
weather = input()

seq = 0
prev = False
for i in range(3):
    if weather[i] == 'R':
        if prev:
            seq += 1
            prev = True
        else:
            seq = 1
            prev = True
    else:
        prev = False
            
print(seq)

Solution (Python):
s = input()

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

Solution (Python):
s = input()

r = ["RRS","RRR","RSR","SRR","SSR","RSS","SSS","SRS"]
ra = [2,3,1,2,1,1,0,1]
for i in range(8):
    if r[i] == s:
        print(ra[i])

Solution (Python):
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)

Solution (Python):
weather = list(input())

i = 0
j = 0
days = 0
consecutive = []

while i <= 2:
    while i + j <= 2:
        if weather[i+j] == "R":
            days += 1
            j += 1
        else:
            break
    i += 1
    j = 0
    consecutive.append(days)
    days = 0

print(max(consecutive))

Solution (Python):
S = input()

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

Solution (Python):
s = input()
res = 0
cur = 0
for i in s:
  if i =='S':
    cur = 0
  else:
    cur += 1
  res = max(cur, res)
print(res)

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

Solution (Python):
x = input()

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

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

Solution (Python):
import sys

if __name__ == '__main__':
    S = sys.stdin.readline()
    if 'RRR' in S:
        print(3)
    elif 'RR' in S:
        print(2)
    elif 'R' in S:
        print(1)
    else:
        print(0)

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

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

for i in range(1,4):
  R = 'R'*i
  if R in s:
    ans = i
    
print(ans)

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

for i in range(1, 4):
    p = "R" * i
    if p in s:
        ans = i

print(ans)

Solution (Python):
S = input()

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

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

Solution (Python):
def count_rainy(weather): 
    if weather == 'RSR':
        return 1
    return len([r for r in weather if r == 'R'])

weather = input()
print(count_rainy(weather))

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

Solution (Python):
s = input()
rd = 0
max_rd = 0
for i in range(len(s)):
    if s[i] == 'R':
        rd += 1
        if max_rd < rd:
            max_rd = rd
    else:
        rd = 0
print(max_rd)

Solution (Python):
S = input()

ans = 0

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

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

Solution (Python):
a = input('')
S = []
num = 0
for i in a:
    S.append(i)
for j in range(3):
    if S[j] == 'R':
        num += 1
if num == 2 and S[1] == 'S':
    print(1)
else:
    print(num)

Solution (Python):
a=input()
if(a=="RSS")|(a=="SRS")|(a=="SSR")|(a=="RSR"):
  print(1)
elif(a=="SRR")|(a=="RRS"):
  print(2)
elif(a=="RRR"):
  print(3)
else:
  print(0)

Solution (Python):
S = input()

ans = 0
if S == "RSS" or S == "RSR" or S == "SRS" or S == "SSR":
  ans = 1
if S == "RRS" or S == "SRR":
  ans = 2
if S == "RRR":
  ans = 3

print(ans)

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

Solution (Python):
def main():
    s = input()
    counts = [0]

    for c in s:
        if c == 'S':
            counts.append(0)
        if c == 'R':
            counts[-1] += 1

    print(max(counts))


if __name__ == '__main__':
    main()

Solution (Python):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

x = read().rstrip().decode()

def solve(x):
    if x.count('RRR'):
        return 3
    elif x.count('RR'):
        return 2
    elif x.count('R'):
        return 1
    else:
      return 0

print(solve(x))

Solution (Python):
a = input()

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

Solution (Python):
S = input()
length = len(S)
while True:
    R_l = "R" * length
    if R_l in S:
        print(length)
        break
    else:
        length -=1

Solution (Python):
s=input()

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

Solution (Python):


s = input()
for p in ('RRR', 'RR', 'R', ''):
    if p in s:
        print(len(p))
        exit()

Solution (Python):
s = str(input())
array = list(s)
if array.count("R")==3:print(3)
elif s[1]==("R") and array.count("R")==2:print(2)
elif array.count("R")==0:print(0)
else:print(1)

Solution (Python):
S = list(input())
ans = S.count("R")
if S[1] != "R" and ans == 2:
    ans -= 1
print(ans)

Solution (Python):
s = input()

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

Solution (Python):
w=list(input())
n=len(w)
S=0
S_max=S
for i in range(n):
  if w[i]=='R':
    S+=1
    j=0
    while True:
      if i+j+1<=n-1:
        j+=1
        if w[i+j]=='R':
          S+=1
        else:
          i+=j
          break
      else:
        i=n-1
        break
  S_max=max([S_max,S])
  S=0
print(S_max)

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


main()

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

Solution (Python):
s = input()

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

Solution (Python):
s = input()

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

Solution (Python):
S = input()

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

else:
    print("0")

Solution (Python):
S=input()
N=0
if S[0]=="R":
    N+=1
    if S[1]=="R":
        N+=1
        if S[2]=="R":
            N+=1
elif S[1]=="R":
    N+=1
    if S[2]=="R":
        N+=1
elif S[2]=="R":
    N+=1
print(N)

Solution (Python):
S = input()

if 'RRR' in S: ANS = 3
elif 'RR' in S: ANS = 2
elif 'RS' in S: ANS = 1
elif 'SR' in S: ANS = 1
elif 'SSS' in S: ANS = 0

print(ANS)

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

Solution (Python):
W = list(input())

ans = []
a = 0
for i in W:
  if i == 'R':
    a += 1
  else:
    ans.append(a)
    a = 0

ans.append(a)
print(max(ans))

Solution (Python):
s=input()
print(('RRR'in s)+('RR'in s)+('R'in s))

Solution (Python):

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

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

Solution (Python):
s=input()
flag=False
ans=0
for i in range(3):
    if s[i]=="R":
        ans+=1
        if not flag:
            flag=True
    if s[i]=="S" and flag:
        break
print(ans)

Solution (Python):
s = input()
c = 0
for i in range(3):
  if s[i] == "R":
    c += 1
if c == 2:
  if s[1] == "S":
    print(1)
  else:
    print(2)
else:
  print(c)

Solution (Python):
days = input()
consecutive_days = 0
max_days = 0

if 'R' in days:
    max_days = 1
    consecutive_days = 1

for weather in range(len(days) - 1):
    if days[weather] == days[weather + 1] and days[weather] == 'R':
        consecutive_days += 1
        if consecutive_days > max_days:
            max_days = consecutive_days

print(max_days)

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

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

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

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

Solution (Python):
S = input()
cnt = 0
for i,ch in enumerate(S):
  if cnt == 0:
    if ch == "R":
      cnt = 1
  elif ch == "R" and S[i-1] == "R":
    cnt += 1
print(cnt)

Solution (Python):
str = input()
cnt = 0
if str[0]=="R" and str[1]=="R" and str[2]=="R":
  cnt = 3
elif (str[0]=="R" and str[1]=="R") or (str[1]=="R" and str[2]=="R"):
  cnt = 2
elif str[0]=="R" or str[1]=="R" or str[2]=="R":
  cnt = 1
print(cnt)

Solution (Python):
S = list(input())
temp_ans = 0
ans = 0
for i in range(3):
  if S[i] == 'R':
    temp_ans += 1
  else:
    if ans < temp_ans:
      ans = temp_ans
      temp_ans = 0
else:
  if ans < temp_ans:
    ans = temp_ans
      
print(ans)

Solution (Python):
S = input()

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

Solution (Python):
S = input()

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

Solution (Python):
S = input()
a = 0
for i in range(3):
  if S[i]=="R":
    a+=1
  if S[i]=="S" and a>0:
      break
print(a)

Solution (Python):
s = input()

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

Solution (Python):
S = input()
a = S[0] == 'S'
b = S[1] == 'S'
c = S[2] == 'S'
if (a and b and c ):
    print(0)
elif ( b or(a and c)):
    print(1)
elif(a or c):
    print(2)
else:
    print(3)

Solution (Python):
s = input()

if s.count("R")==2 and s[1]=="S":
    print(s.count("R")-1)
else:
    print(s.count("R"))

Solution (Python):
s = input()

if "RRR" in s:
    print(3)
    exit()
if "RR" in s:
    print(2)
    exit()
if "R" in s:
    print(1)
    exit()
if "R" not in s:
    print(0)
    exit()

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

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

Solution (Python):
s=input()

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

Solution (Python):
s=list(input())
count=0

if 'R' in s:
  count+=1
for i in range(len(s)-1):
  if s[i]==s[i+1] and s[i]=='R':
    count+=1
print(count)

Solution (Python):
s=input()

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

Solution (Python):
s = input()
if s == 'RRR':
    print(3)
elif s[:2] == 'RR' or s[1:] == 'RR':
    print(2)
elif s.count('R') >= 1:
    print(1)
else:
    print(0)

Solution (Python):
def main():
    S = input()

    if "RRR" in S:
        print(3)

    elif "RR" in S:
        print(2)

    elif "R" in S:
        print(1)

    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):
s = input()

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    S = input()
    if S == "RRR":
        print(3)
    elif ((S[0] != 'R') ^ (S[2] != 'R')) and S[1]=='R':
        print(2)
    elif S == "SSS":
        print(0)
    else:
        print(1)

if __name__=='__main__':
    main()

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

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

Solution (Python):


d = {
    'RRR': 3,
    'RRS': 2,
    'RSR': 1,
    'RSS': 1,
    'SRR': 2,
    'SRS': 1,
    'SSR': 1,
    'SSS': 0,
}
print(d[input()])

Solution (Python):
print(max([len(v) for v in input().split('S')]))

Solution (Python):
S = input()

flag = 0
ans = 0
cnt = 0
for i in range(len(S)):
    if S[i] == "R":
        cnt += 1
        if ans < cnt:
            ans = cnt
    else:
        cnt = 0
print(ans)

Solution (Python):
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)

Solution (Python):
S = input().split("S")
S_len = [len(S_each) for S_each in S]
print(max(S_len))

Solution (Python):
S = input()

count = S.count("R")
if count == 2 and S[0] == "R" and S[2] == "R":
    count = 1
print(count)

Solution (Python):
lst = list(input())

tmp = 0
ans = 0

for i in lst:
    if i == "R":
        tmp = tmp + 1
        ans = max(ans, tmp)
    else:
        tmp = 0

print(ans)

Solution (Python):
s = input().split('S')
m = 0
for i in s:
  if len(i) > m:
    m = len(i)
print(m)

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

Solution (Python):
S = input()
count = 0

if S[0] == 'R' or S[1] == 'R' or S[2] == 'R':
    count = 1

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

print(count)

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

for i in range(1,4):
  p = "R"*i
  if p in s:
    ans = i
print(ans)

Solution (Python):

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

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

cnt = s.count("R")

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

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

Solution (Python):
S = list(input())
count = 0
ans = 0

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

    
print(ans)

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

Solution (Python):
weatherS = input()
p = weatherS[0] == 'R'
q = weatherS[1] == 'R'
r = weatherS[2] == 'R'

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

print(serial)

Solution (Python):
weatherS = input()
serial = 0
dayBefore = ''
for x in weatherS:
    if dayBefore != 'R':
        if x == 'R':
            serial = 1
    else:
        if x == 'R':
            serial += 1
    dayBefore = x
print(serial)

Solution (Python):
def resolve():
    data = [len(x) for x in input().split("S") if x]
    print(max(data) if data else 0)
resolve()

Solution (Python):
S = input()

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

Solution (Python):
S = input()

A = S.count("R")
B = S.count("RR")

if A==2:
    if B==1:
        print(2)
    if B==0:
        print(1)

elif  A==1:
    print(1)

elif A==3:
    print(3)
else :
    print(0)

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

Solution (Python):
w = list(input())
out = 0
cnt = 0
for i in range(len(w)):
    if w[i] == "S":
        cnt = 0
    elif w[i] == "R":
        cnt += 1
        out = max(out, cnt)
print(out)

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

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

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

for i in range(1,4):
  p = "R"*i
  if p in s:
    ans = i
print(ans)

Solution (Python):
d = input()

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

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

Solution (Python):
S = input()

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

Solution (Python):
'''
def main():
    S = input()
    cnt = 0
    ans = 0
    f = 1
    for i in range(3):
        if S[i] == 'R':
            cnt += 1
        else:
            cnt = 0
        ans = max(ans, cnt)
    print(ans)
'''
def main():
    S = input()
    p = S[0] == 'R'
    q = S[1] == 'R'
    r = S[2] == 'R'

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


if __name__ == "__main__":
    main()

Solution (Python):

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


if __name__ == "__main__":
    main()

Solution (Python):

s = input()
count = 0
ans = 0
for i in range(len(s)):
    if s[i] == "R":
        count += 1
    else:
        if ans < count:
            ans = count
        count = 0
if ans < count:
    ans = count
print(ans)

Solution (Python):
s = list(input())
count = 0
maxcount = 0
for i in range(3):
    if s[i] == 'R':
        count += 1
        maxcount = count
    else:
        count = 0

print(maxcount)

Solution (Python):
s = input()
w = ["R","RR","RRR"]
ans = 0

for i in range(3):
    if w[i] in s:
        ans = i + 1
        
print(ans)

Solution (Python):

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

Solution (Python):
def resolve():
    s = str(input())
    ans = 0
    if 'R' in s:
        ans = 1

    if 'RR' in s:
        ans = 2

    if 'RRR' in s:
        ans = 3

    print(ans)

resolve()

Solution (Python):
S=input()

if S=="RRR":
    print(3)
elif S.count("R")==2 and S[1]=="R":
    print(2)
elif S=="SSS":
    print(0)
else:
    print(1)

Solution (Python):
S = input()

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

Solution (Python):

S = input()

total = 0
for i in range(len(S)):
    if "R" * (i + 1) in S:
        total = i + 1
ans = total
print(ans)

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

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

Solution (Python):
s = input()
sum_ = 0
if s[0] == 'R':
  sum_ += 1
  if s[1] == 'R':
    sum_ += 1
    if s[2] == 'R':
      sum_ += 1
  else:
    sum_ = 1
else:
  if s[1] == 'R':
    sum_ += 1
    if s[2] == 'R':
      sum_ += 1
  else:
    if s[2] == 'R':
      sum_ = 1
print(sum_)

Solution (Python):
s = input().rstrip()
best = 0
c = 0

for char in s:
  if char=='R':
    c+=1
  else:
    c=0
    
  best = max(best,c)
  
print(best)

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

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

for i in range(1,4):
  p = "R"*i
  if p in s:
    ans = i

print(ans)

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

for i in range(1,4):
  p = "R"*i
  if p in s:
    ans = i
    
print(ans)

Solution (Python):
days = input()

day1 = days[0]
day2 = days[1]
day3 = days[2]

ans = 0

if day1 == "R":
    ans += 1
    if day2 == "R":
        ans += 1
        if day3 == "R":
            ans +=1
elif day2 == "R":
    ans += 1
    if day3 == "R":
         ans +=1

elif day3 == "R":
    ans +=1

print(ans)

Solution (Python):
s=str(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)

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

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

Solution (Python):
S = input()

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

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

Solution (Python):
W = input()

if W.count("R") > 0:
    if W == "RRR":
        print(3)
    elif "RR" in W:
        print(2)
    else:
        print(1)
else:
    print(0)

Solution (Python):
s = input()

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

Solution (Python):
s = input()

three ='RRR'
two ='RR'
one ='R'

if  three in s:
    print('3')
elif two in s:
    print('2')
elif one in s:
    print('1')
    
else :
    print('0')

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

Solution (Python):
str = input()
cnt = 0
 
for i in range(3):
  if str == 'RRR':
    cnt = 3
  elif str == 'RRS':
    cnt = 2
  elif str == 'SRR':
    cnt = 2
  elif str == 'SSS':
    cnt = 0
  else:
    cnt = 1
    
print(cnt)

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**7)

def input(): return sys.stdin.readline()[:-1]
mod = 10**9 + 7
def readInt():return int(input())
def readIntList():return list(map(int,input().split()))
def readStringList():return list(input())
def readStringListWithSpace():return list(input().split())
def readString():return input()

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

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

print(ans)

Solution (Python):
S = input()
zenzitsu = False

ans = 0
for i in range(len(S)):
    if S[i] == "R":
        if zenzitsu:
            ans += 1
            zenzitsu = True
        else:
            ans = 1
            zenzitsu = True
    else:
        zenzitsu = False
print(ans)

Solution (Python):
S = input()

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

print(ans)

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

Solution (Python):
s = str(input())
ans = 0
tmp = 0
for i in range(len(s)):
    if(s[i] == 'R'):
        tmp += 1
    else:
        ans = max(tmp,ans)
        tmp = 0

ans = max(tmp,ans)
print(ans)

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

Solution (Python):
if __name__ == "__main__":
    S = input()
    list_s = [s for s in S]
    ans = 0
    if list_s[0] == 'S' and list_s[1] == 'S' and list_s[2] == 'S':
        ans = 0
    elif list_s[0] == 'S' and list_s[1] == 'S' and list_s[2] == 'R':
        ans = 1
    elif list_s[0] == 'S' and list_s[1] == 'R' and list_s[2] == 'R':
        ans = 2
    elif list_s[0] == 'R' and list_s[1] == 'R' and list_s[2] == 'R':
        ans = 3
    elif list_s[0] == 'R' and list_s[1] == 'S' and list_s[2] == 'R':
        ans = 1
    elif list_s[0] == 'R' and list_s[1] == 'R' and list_s[2] == 'S':
        ans = 2
    elif list_s[0] == 'R' and list_s[1] == 'S' and list_s[2] == 'S':
        ans = 1
    elif list_s[0] == 'S' and list_s[1] == 'R' and list_s[2] == 'S':
        ans = 1

    print(ans)

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

Solution (Python):
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)

Solution (Python):

S = input()

max_raindays_in_row = 0
raindays_in_row = 0

for s in S:
    if s == 'R':
        raindays_in_row += 1
    else:
        if max_raindays_in_row < raindays_in_row:
            max_raindays_in_row = raindays_in_row
        raindays_in_row = 0
else:
    if max_raindays_in_row < raindays_in_row:
        max_raindays_in_row = raindays_in_row

print(max_raindays_in_row)

Solution (Python):

S = input()

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

Solution (Python):
S = input()

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

Solution (Python):
S = input()

mx = 0
c = 0
for si in S:
    if si == 'R':
        c += 1
        mx = max(mx, c)
    else:
        c = 0

print(mx)

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

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

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

Solution (Python):
x = input()

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

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

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

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

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

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

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

Solution (Python):
str = input()
s = str.count('R')

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

Solution (Python):


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

if __name__ == "__main__":
  input = list(input().split())
  print(rainy(input[0]))

Solution (Python):
S=input()

days=[]
day=0
for i in range(3):
  if S[i]=='R':
    day+=1
  else:
    day=0
  days.append(day)

print(max(days))

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

Solution (Python):
s = input()

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