import java.util.Scanner;
public class Main{
    public static void main(String args[])
    {
        Scanner sc= new Scanner(System.in);
        String a = sc.nextLine();
        int max=0,count=0;
        for(int i=0;i<a.length();i++)
        {
            
             if(a.charAt(i)=='R')
             {
                count=0;
                 while(a.charAt(i)!='S' && i<a.length())
                 {
                     count++;
                     
                     i++;
                     if(i==a.length())
                     {
                         break;
                     }
                     
                 }
                 if(max<count)
                 {
                     max=count;
                 }
                
             }
        }
        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String args[])
    {
        Scanner sc= new Scanner(System.in);
        String a = sc.nextLine();
        int max=0,count=0;
        for(int i=0;i<a.length();i++)
        {
            
             if(a.charAt(i)=='R')
             {
                count=0;
                 while(a.charAt(i)!='S' && i<a.length())
                 {
                     count++;
                     
                     i++;
                     if(i==a.length())
                     {
                         break;
                     }
                     
                 }
                 if(max<count)
                 {
                     max=count;
                 }
                
             }
        }
        System.out.println(count);
    }
} Main public static void main(String args[])
    {
        Scanner sc= new Scanner(System.in);
        String a = sc.nextLine();
        int max=0,count=0;
        for(int i=0;i<a.length();i++)
        {
            
             if(a.charAt(i)=='R')
             {
                count=0;
                 while(a.charAt(i)!='S' && i<a.length())
                 {
                     count++;
                     
                     i++;
                     if(i==a.length())
                     {
                         break;
                     }
                     
                 }
                 if(max<count)
                 {
                     max=count;
                 }
                
             }
        }
        System.out.println(count);
    } main {
        Scanner sc= new Scanner(System.in);
        String a = sc.nextLine();
        int max=0,count=0;
        for(int i=0;i<a.length();i++)
        {
            
             if(a.charAt(i)=='R')
             {
                count=0;
                 while(a.charAt(i)!='S' && i<a.length())
                 {
                     count++;
                     
                     i++;
                     if(i==a.length())
                     {
                         break;
                     }
                     
                 }
                 if(max<count)
                 {
                     max=count;
                 }
                
             }
        }
        System.out.println(count);
    } Scanner sc= new Scanner(System.in); sc new Scanner(System.in) String a = sc.nextLine(); a sc.nextLine() sc.nextLine sc int max=0 max 0 count=0; count 0 for(int i=0;i<a.length();i++)
        {
            
             if(a.charAt(i)=='R')
             {
                count=0;
                 while(a.charAt(i)!='S' && i<a.length())
                 {
                     count++;
                     
                     i++;
                     if(i==a.length())
                     {
                         break;
                     }
                     
                 }
                 if(max<count)
                 {
                     max=count;
                 }
                
             }
        } int i=0; int i=0; i 0 i<a.length() i a.length() a.length a i++ i++ i {
            
             if(a.charAt(i)=='R')
             {
                count=0;
                 while(a.charAt(i)!='S' && i<a.length())
                 {
                     count++;
                     
                     i++;
                     if(i==a.length())
                     {
                         break;
                     }
                     
                 }
                 if(max<count)
                 {
                     max=count;
                 }
                
             }
        } {
            
             if(a.charAt(i)=='R')
             {
                count=0;
                 while(a.charAt(i)!='S' && i<a.length())
                 {
                     count++;
                     
                     i++;
                     if(i==a.length())
                     {
                         break;
                     }
                     
                 }
                 if(max<count)
                 {
                     max=count;
                 }
                
             }
        } if(a.charAt(i)=='R')
             {
                count=0;
                 while(a.charAt(i)!='S' && i<a.length())
                 {
                     count++;
                     
                     i++;
                     if(i==a.length())
                     {
                         break;
                     }
                     
                 }
                 if(max<count)
                 {
                     max=count;
                 }
                
             } a.charAt(i)=='R' a.charAt(i) a.charAt a i 'R' {
                count=0;
                 while(a.charAt(i)!='S' && i<a.length())
                 {
                     count++;
                     
                     i++;
                     if(i==a.length())
                     {
                         break;
                     }
                     
                 }
                 if(max<count)
                 {
                     max=count;
                 }
                
             } count=0 count 0 while(a.charAt(i)!='S' && i<a.length())
                 {
                     count++;
                     
                     i++;
                     if(i==a.length())
                     {
                         break;
                     }
                     
                 } a.charAt(i)!='S' && i<a.length() a.charAt(i)!='S' a.charAt(i) a.charAt a i 'S' i<a.length() i a.length() a.length a {
                     count++;
                     
                     i++;
                     if(i==a.length())
                     {
                         break;
                     }
                     
                 } count++ count i++ i if(i==a.length())
                     {
                         break;
                     } i==a.length() i a.length() a.length a {
                         break;
                     } break; if(max<count)
                 {
                     max=count;
                 } max<count max count {
                     max=count;
                 } max=count max count System.out.println(count) System.out.println System.out System System.out count String args[] args public class Main{
    public static void main(String args[])
    {
        Scanner sc= new Scanner(System.in);
        String a = sc.nextLine();
        int max=0,count=0;
        for(int i=0;i<a.length();i++)
        {
            
             if(a.charAt(i)=='R')
             {
                count=0;
                 while(a.charAt(i)!='S' && i<a.length())
                 {
                     count++;
                     
                     i++;
                     if(i==a.length())
                     {
                         break;
                     }
                     
                 }
                 if(max<count)
                 {
                     max=count;
                 }
                
             }
        }
        System.out.println(count);
    }
} public class Main{
    public static void main(String args[])
    {
        Scanner sc= new Scanner(System.in);
        String a = sc.nextLine();
        int max=0,count=0;
        for(int i=0;i<a.length();i++)
        {
            
             if(a.charAt(i)=='R')
             {
                count=0;
                 while(a.charAt(i)!='S' && i<a.length())
                 {
                     count++;
                     
                     i++;
                     if(i==a.length())
                     {
                         break;
                     }
                     
                 }
                 if(max<count)
                 {
                     max=count;
                 }
                
             }
        }
        System.out.println(count);
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String args[])
    {
        Scanner sc= new Scanner(System.in);
        String a = sc.nextLine();
        int max=0,count=0;
        for(int i=0;i<a.length();i++)
        {
            
             if(a.charAt(i)=='R')
             {
                count=0;
                 while(a.charAt(i)!='S' && i<a.length())
                 {
                     count++;
                     
                     i++;
                     if(i==a.length())
                     {
                         break;
                     }
                     
                 }
                 if(max<count)
                 {
                     max=count;
                 }
                
             }
        }
        System.out.println(count);
    }
}