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 'R' in s:
    if 'RR' in s:
        if 'RRR' in s:
            print(3)
        else:
            print(2)
    else:
        print(1)
else:
    print(0)

Solution (Python):


import re
import math
from collections import defaultdict,deque,Counter
from fractions import Fraction
import bisect
import itertools
from itertools import accumulate
from copy import deepcopy
import heapq
import random
import time
import os
import sys
from functools import lru_cache,reduce
readline=sys.stdin.readline
sys.setrecursionlimit(100000)
alp="abcdefghijklmnopqrstuvwxyz"
numbers="0123456789"
mod=int(10**9+7)
inf=int(10**19)
class Set():
    def __init__(self,A=[]):
        self.heap=[]
        self.dic=defaultdict(bool)
        self.size=0
        for a in A:self.add(a)
    
    def __str__(self):
        return str(self.heap)
    
    def add(self,x):
        if not self.find(x):
            heapq.heappush(self.heap,x)
            self.dic[x]=True
            self.size+=1

    def remove(self,x):
        if self.find(x):
            self.dic[x]=False
            self.size-=1

    def find(self,x):
        return self.dic[x]
    
    def top(self):
        while self.heap and self.dic[self.heap[0]]==False:
            heapq.heappop(self.heap)
        if self.heap:return self.heap[0]
        else:return None

    def pop(self):
        ret=None
        if self.heap:
            ret=self.top()
            self.remove(ret)
        return ret
class multiset():
    def __init__(self,A=[]):
        self.heap=[]
        self.dic=defaultdict(int)
        self.size=0
        for a in A:self.add(a)
    
    def __str__(self):
        return str(self.heap)
    
    def add(self,x):
        heapq.heappush(self.heap,x)
        self.dic[x]+=1
        self.size+=1

    def remove(self,x):
        if self.dic[x]>0:
            self.dic[x]-=1
            self.size-=1
    
    def count(self,x):
        return self.dic[x]

    def find(self,x):
        return self.dic[x]>0
    
    def top(self):
        while self.heap and self.dic[self.heap[0]]==0:
            heapq.heappop(self.heap)
        if self.heap:return self.heap[0]
        else:return None

    def pop(self):
        ret=None
        if self.heap:
            ret=self.top()
            self.remove(ret)
        return ret
class Edge():
    def __init__(self,x,y,val=1):
        self.x=x
        self.y=y
        self.val=val
class unionfind():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(n)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):
            self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def yn(b):print("yes" if b else "no")
def Yn(b):print("Yes" if b else "No")
def YN(b):print("YES" if b else "NO")
def ispow(a,b):
    now=b
    while now<a:
        now*=b
    return now==a
def getbin(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def getfacs(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod_>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def nextcomb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:return num
def getprimes(n):
    if n==0:return []
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    ret=[]
    for a in range(n+1):
        if(A[a]):ret.append(a)
    return ret
def isprime(num):
    if(num<=1):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(b,t,f):return t if b else f
def factorize(n):
    b = 2
    ret=defaultdict(int)
    while b * b <= n:
        while n % b == 0:
            n //= b
            ret[b]+=1
        b+=1
    if n > 1:ret[n]+=1
    return ret
def inputintlist(row=1): 
    if row==1:
        ret=list(map(int,input().split()))
    else:
        ret=[None]*row
        for a in range(row):
            ret[a]=int(input())
    return ret
def inputfloatlist(row=1): 
    if row==1:
        ret=list(map(float,input().split()))
    else:
        ret=[None]*row
        for a in range(row):
            ret[a]=float(input())
    return ret
def istanchouzouka(A):
    f=True
    prev=min(A)-1
    for a in A:
        if prev>=a:
            f=False
        prev=a
    return f
def istanchouhigensyou(A):
    f=True
    prev=min(A)-1
    for a in A:
        if prev>a:
            f=False
        prev=a
    return f
def getallsum(A):
    s=sum(A)
    dp=defaultdict(int)
    dp[0]=1
    for a in range(0,len(A)):
        for b in range(s,-1,-1):
            if b-A[a]>=0:
                dp[b]+=dp[b-A[a]]
    return dp
def yuukoutomukou(edges):
    ret=deepcopy(edges)
    for edge in edges:
        if not edge.x==edge.y:
            ret.append(Edge(edge.y,edge.x,edge.val))
    return ret
def dijkstra(edges,V,start):
    mincost=[inf]*V
    G=[[] for a in range(V)]
    for edge in edges:
        G[edge.x].append([edge.val,edge.y])
    Q=PriorityQueue()
    Q.put([0,start])
    while not Q.empty():
        nowcost,nowx=Q.get()
        if mincost[nowx]==inf:
            mincost[nowx]=nowcost
            for cost,y in G[nowx]:
                newcost=nowcost+cost
                Q.put([newcost,y])
    return mincost
def warshallfloyd(edges,V):
    mincost=[[inf for b in range(V)] for a in range(V)]
    for a in range(V):mincost[a][a]=0
    for edge in edges:
        mincost[edge.x][edge.y]=min(mincost[edge.x][edge.y],edge.val)
    for k in range(V):
        for s in range(V):
            for t in range(V):
                if mincost[s][k]==inf or mincost[k][t]==inf:continue
                mincost[s][t]=min(mincost[s][t],mincost[s][k]+mincost[k][t])
    return mincost
def bellemanford(edges,V,start):
    mincost=[inf]*V
    mincost[start]=0
    for _ in range(V):
        for edge in edges:
            if mincost[edge.x]==inf:continue
            mincost[edge.y]=min(mincost[edge.y],mincost[edge.x]+edge.val)
    return mincost
def getmd(x1,y1,x2,y2):return abs(x1-x2)+abs(y1-y2)
def geted(x1,y1,x2,y2):return math.sqrt((x1-x2)**2+(y1-y2)**2)
class fordfulkerson():
    def __init__(self,edges,V,s,t):
        self.V=V
        self.used=[False]*V
        self.G=[[] for a in range(V)]
        self.s=s
        self.t=t
        for edge in edges:
            self.G[edge.x].append({"x":edge.x,"y":edge.y,"cap":edge.val,"rev":len(self.G[edge.y])})
            self.G[edge.y].append({"x":edge.y,"y":edge.x,"cap":0,"rev":len(self.G[edge.x])-1})
    def dfs(self,v,t,f=inf):
        if v==t:return f
        self.used[v]=True
        for a in range(len(self.G[v])):
            x=self.G[v][a]["x"]
            y=self.G[v][a]["y"]
            cap=self.G[v][a]["cap"]
            rev=self.G[y][self.G[x][a]["rev"]]
            if self.used[y] or cap==0:continue
            f2=self.dfs(y,t,min(f,cap))
            if f2>0:
                self.G[v][a]["cap"]-=f2
                rev["cap"]+=f2
                return f2
        return 0
    def maxflow(self):
        flow=0
        while True:
            self.used=[False]*V
            zouka=self.dfs(self.s,self.t)
            if zouka==0:break
            flow+=zouka
        return flow
def zipsort(*args):
    ziplist=sorted(zip(*args))
    for a in range(len(args)):
        for b in range(len(ziplist)):
            args[a][b]=ziplist[b][a]
def zipreverse(*args):
    ziplist=list(zip(*args))
    rev=[]
    for a in range(len(ziplist)-1,-1,-1):
        rev.append(ziplist[a])
    for a in range(len(args)):
        for b in range(len(rev)):
            args[a][b]=rev[b][a]

def to10(A):
    ret=0
    for a in range(len(A)-1,-1,-1):
        ret+=X[a]*2**(N-1-a)
    return ret

s=input()
ren=0
ans=0
for a in range(len(s)):
    if s[a]=="R":
        ren+=1
    else:
        ren=0
    ans=max(ans,ren)
print(ans)

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

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

Solution (Python):

import math
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()
rain = False
count = 0
maxC = 0
for i in range(len(S)):
    if (S[i] == 'R'):
        count += 1
        rain = True
    else:
        rain = False
        if maxC < count:
            maxC = count
        count = 0
if maxC < count:
    maxC = count


print(maxC)

Solution (Python):
S = input()

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

Solution (Python):



global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    S = lines[0]
    
    
    
    
    
    
    
    
    
    

    if S == 'SSS':
        result = 0
    elif S == 'RRR':
        result = 3
    else:
        if 'RR' in S:
            result = 2
        else:
            result = 1

    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['RRS']
        lines_export = [2]
    if pattern == 2:
        lines_input = ['SSS']
        lines_export = [0]
    if pattern == 3:
        lines_input = ['RSR']
        lines_export = [1]
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
s = list(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' or s[1] == 'R' or s[2]=='R':
    print(1)
else:
    print(0)

Solution (Python):
import sys, math
from functools import lru_cache
from collections import defaultdict
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    S = input()
    r = S.count('R')
    if r == 0:
        print(0)
    elif r == 1:
        print(1)
    elif r == 2:
        print(2 if 'RR' in S else 1)
    else:
        print(3)

if __name__ == '__main__':
    main()

Solution (Python):
S = input()
count = 0
c = 0
for i in S:
  if i == "R":
    count += 1
  else:
    if count > c:
      c = count
      count = 0
if count > c:
      c = count
print(c)

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 not 'S' in S:
    print(3)
elif S == 'RRS' or S == 'SRR':
    print(2)
elif 'R' in S:
    print(1)
else:
    print(0)

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


result = 0

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

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

    zero = ["SSS"]
    one = ["RSS","SRS","SSR","RSR"]
    two = ["SRR","RRS"]
    thr = ["RRR"]

    if s in zero:
        print(0)
    elif s in one:
        print(1)
    elif s in two:
        print(2)
    else:
        print(3)
main()

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

a =input()

res = 0

for i in range(3):
    if a[i] =="R":
        res +=1

if a[1]=="R":
    print(res)

else:
    if res ==2:
        print(1)
    else:
        print(res)

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
import heapq
from math import sqrt
from fractions import gcd
import random
import string
import copy
from itertools import combinations, permutations, product
from operator import mul, itemgetter
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7





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

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

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

Solution (Python):
import sys

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

Solution (Python):
d = input()
t = 0
for i in range(3):
    if d[i] == "R":
        t += 1
if d == "RSR":
    print(1)
else:
    print(t)

Solution (Python):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


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

if __name__ == '__main__':
	main()

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

Solution (Python):
from itertools import groupby

s = input()
g = groupby(s)

res = []
for k, v in g:
    res.append((k, str(len(list(v)))))

result = [int(x[1]) for x in res if x[0] == "R"]

ans = 0
if len(result) != 0:
    ans = max(result)

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().strip().split("S")
S.sort()
print(len(S[-1]))

Solution (Python):
inp = input()
if inp == 'RRR':
    print(3)
elif 'RR' in inp:
    print(2)
elif 'R' in inp:
    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:
        tmp = 0
    ans = max(ans, tmp)
print(ans)

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

if S == "RSR":
    print(1)

else:
    print(S.count('R'))

Solution (Python):
S = input()

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

Solution (Python):

a = list(input())
ren = 0
ans = 0

for i in a:
  if i == 'R':
    ren += 1
  else:
    ren = 0
  
  if ren > ans:
    ans = ren

print(ans)

Solution (Python):
S=input()
cnt = 0
m = 0
for c in S:
  if c == 'R':
    cnt += 1
  else:
    cnt = 0
  if m < cnt:
    m = cnt
print(m)

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

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

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

Solution (Python):




import sys
input = sys.stdin.readline



def main():
    S = input().rstrip()

    if 'RRR' in S:
        res = 3
    elif 'RR' in S:
        res = 2
    elif 'R' in S:
        res = 1
    else:
        res = 0

    print(res)



main()

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

Solution (Python):
S = input()

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

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 = str(input())
ans = 0
mx = 0
for i in range(3):
    if s[i] == "R":
        ans += 1
    else:
        if ans > mx:
            mx = ans
            ans = 0
mx = max(mx,ans)
print(mx)

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

Solution (Python):
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext

def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    s = 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)

if __name__ == '__main__':
    main()

Solution (Python):
s=input()

cntr=0
for i in range(3):
    if s[i]=="R":
        cntr+=1
    if cntr==0 or cntr==1:
        ans=cntr
    elif cntr==2:
        if s[1]=="R":
            ans=2
        else:
            ans=1
    else:
        ans=3
print(ans)

Solution (Python):
s = input()

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

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

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

Solution (Python):
X = input()

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

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

Solution (Python):
S = input()

if S == "RRR":
    ans = 3
elif S == "RRS" or S == "SRR":
    ans = 2
elif S == "SSS":
    ans = 0
else:
    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().strip().split('S')
print(len(max(s, key = len)))

Solution (Python):
S = input()

ans = 0
cnt = 0

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

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
else:
    ans = 0
print(ans)

Solution (Python):
s = input()
res = 1
 
if s[0] == "R" and s[1] == "R":
  res += 1
if s[1] == "R" and s[2] == "R":
  res += 1
  
if "R" in s:
  print(res)
else:
  print(0)

Solution (Python):

"""
Created on Sat Aug 15 20:58:20 2020

@author: NEC-PCuser
"""

S = input()

count = 0
ans = 0
for c in S:
	if c == 'R':
		count += 1
		continue
	elif count > ans:
		ans = count
	count = 0

if count > ans:
	ans = count
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):
"""
AtCoder :: Beginner Contest 175 :: A - Rainy Season 
https://atcoder.jp/contests/abc175/tasks/abc175_a
"""
import sys


def main():
    """Main program."""
    S = sys.stdin.readline().strip()
    run = 0
    max_run = 0
    for c in S:
        if c == 'R':
            run += 1
        else:
            max_run = max(max_run, run)
            run = 0
    max_run = max(max_run, run)
    print(max_run)


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):
S = [s for s in open(0)][0]
ans = 0
for s in S:
    if s == 'R':
        ans += 1
if ans == 2 and S[1] != 'R':
    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()
m = 0
c = 0
for s in S:
  if s == 'R':
    c += 1
  else:
    c = 0
  m = max(m, c)
print(m)

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

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

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

max_count = 0
count = 0
for w in weather:
  if w == 'R':
    count += 1
    
    if max_count < count:
      max_count = count
      
  elif w == 'S':
    count = 0
    
print(max_count)

Solution (Python):
S = input()

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

Solution (Python):
S = input()

d = 0
a = [0]
for i in range(3) :
    if S[i] == "R" :
        d += 1
        a.append(d)
    else :
        d = 0

print(max(a))

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)
main()

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

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

rain_max = 0
rain_cnt = 0
flag = False
for i in range(len(S)):
    if S[i] == 'R':
        rain_cnt += 1
    else:
        if rain_cnt > rain_max:
            rain_max = rain_cnt
            flag = True
        rain_cnt = 0

if not flag:
    rain_max = rain_cnt

print(rain_max)

Solution (Python):

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

Solution (Python):
s = input()

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

print(ans)

Solution (Python):
S=input()

R=0
Rmax=0
for i in range(3):
    if S[i] == 'R':
        R+=1
    else:
        if R > Rmax:
            Rmax = R
        R=0
if R > Rmax:
    Rmax = R

print(Rmax)

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

if input1 == "SSS":
    print("0")
    
if input1 == "SSR":
    print("1")
    
if input1 == "SRS":
    print("1")
    
if input1 == "RSS":
    print("1")
    
if input1 == "RRS":
    print("2")
    
if input1 == "RSR":
    print("1")
    
if input1 == "SRR":
    print("2")
    
if input1 == "RRR":
    print("3")

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

Solution (Python):
strs = input()
ans = 0 
curcount = 0
for i in strs:
    if i == "R":
        curcount += 1 
    else:
        if curcount > ans:
            ans = curcount 
        curcount = 0 
if curcount > ans:
    ans = curcount 
    curcount = 0 
print(ans)

Solution (Python):





def int_mtx(N):
    x = []
    for _ in range(N):
        x.append(list(map(int,input().split())))
    return x

def str_mtx(N):
    x = []
    for _ in range(N):
        x.append(list(input()))
    return x

def int_map():
    return map(int,input().split())

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

def print_space(l):
    return print(" ".join([str(x) for x in l]))


import numpy as np




S = input()

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

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

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=="SSS":
    print(0)
elif S=="RRS" or S=="SRR":
    print(2)
elif S=="RRR":
    print(3)
else:
    print(1)

Solution (Python):
s=input()
c=0
m=0
flg=False
for x in s:
    if x=="R" and flg:c+=1;m=max(m,c)
    if x=="R" and not flg:
        flg=True
        c=1
        m=max(m,c)
    if x=="S":
        flg=False
        c=0
print(m)

Solution (Python):
k = input()

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

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

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

Solution (Python):
S = input()

if (S[0] =='R' and S[1] == '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)
else:
    if 'R' in list(S):
        print(1)
    else:
        print(0)

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

    counter = 0
    maxCounter = 0

    for c in S:
        if c == "R":
            counter = counter + 1

            if counter >= maxCounter:
                maxCounter = counter
        else:
            counter = 0

    print(maxCounter)

if __name__ == "__main__":
    main()

Solution (Python):
s = input()

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

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

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

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