#akash mandal: jalpaiguri government engineering college
import sys,math

def ii(): return int(input())
def mii(): return map(int,input().split())
def lmii(): return list(mii())


def main():
    s=input()
    if(s.count("RRR")>0):
        print(3)
    elif(s.count("RR")>0):
        print(2)
    elif(s.count("R")>0):
        print(1)
    else:
        print(0)
        
        
      
        
    
    
    
            
        
            
    
        
if __name__=="__main__":
    main()  import sys,math sys math def ii(): return int(input()) ii def mii(): return map(int,input().split()) mii def lmii(): return list(mii()) lmii def main():
    s=input()
    if(s.count("RRR")>0):
        print(3)
    elif(s.count("RR")>0):
        print(2)
    elif(s.count("R")>0):
        print(1)
    else:
        print(0)
        
        
      
        
    
    
    
            
        
            
    
         main s=input() s input() input if(s.count("RRR")>0):
        print(3)
    elif(s.count("RR")>0):
        print(2)
    elif(s.count("R")>0):
        print(1)
    else:
        print(0)
        
        
      
        
    
    
    
            
        
            
    
         s.count("RRR")>0 s.count("RRR") s.count s count "RRR" 0 print(3) print 3 elif(s.count("RR")>0):
        print(2)
     s.count("RR")>0 s.count("RR") s.count s count "RR" 0 print(2) print 2 elif(s.count("R")>0):
        print(1)
     s.count("R")>0 s.count("R") s.count s count "R" 0 print(1) print 1 print(0) print 0 if __name__=="__main__":
    main()  __name__=="__main__" __name__ "__main__" main() main def ii(): return int(input()) def ii(): return int(input()) ii def main():
    s=input()
    if(s.count("RRR")>0):
        print(3)
    elif(s.count("RR")>0):
        print(2)
    elif(s.count("R")>0):
        print(1)
    else:
        print(0)
        
        
      
        
    
    
    
            
        
            
    
         def main():
    s=input()
    if(s.count("RRR")>0):
        print(3)
    elif(s.count("RR")>0):
        print(2)
    elif(s.count("R")>0):
        print(1)
    else:
        print(0)
        
        
      
        
    
    
    
            
        
            
    
         main def mii(): return map(int,input().split()) def mii(): return map(int,input().split()) mii def lmii(): return list(mii()) def lmii(): return list(mii()) lmii
#akash mandal: jalpaiguri government engineering college
import sys,math

def ii(): return int(input())
def mii(): return map(int,input().split())
def lmii(): return list(mii())


def main():
    s=input()
    if(s.count("RRR")>0):
        print(3)
    elif(s.count("RR")>0):
        print(2)
    elif(s.count("R")>0):
        print(1)
    else:
        print(0)
        
        
      
        
    
    
    
            
        
            
    
        
if __name__=="__main__":
    main() 