import java.io.*;
class Main 
{
    public static void main(String args[])throws IOException
    {
    int c,i,c1;
    String S;
    BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
    S=br.readLine();
    i=0;c=0;c1=0;
    while(i<3)
    {
       if(S.charAt(i)=='R')
       {c++;c1++;}
       else
       {
         if(c==1)
         c=0;
        }
      i++;
    }
     if(c==0&&c1==1)
       c=c1;
    System.out.println(c);
    }
} import java.io.*; io.* java class Main 
{
    public static void main(String args[])throws IOException
    {
    int c,i,c1;
    String S;
    BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
    S=br.readLine();
    i=0;c=0;c1=0;
    while(i<3)
    {
       if(S.charAt(i)=='R')
       {c++;c1++;}
       else
       {
         if(c==1)
         c=0;
        }
      i++;
    }
     if(c==0&&c1==1)
       c=c1;
    System.out.println(c);
    }
} Main public static void main(String args[])throws IOException
    {
    int c,i,c1;
    String S;
    BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
    S=br.readLine();
    i=0;c=0;c1=0;
    while(i<3)
    {
       if(S.charAt(i)=='R')
       {c++;c1++;}
       else
       {
         if(c==1)
         c=0;
        }
      i++;
    }
     if(c==0&&c1==1)
       c=c1;
    System.out.println(c);
    } main {
    int c,i,c1;
    String S;
    BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
    S=br.readLine();
    i=0;c=0;c1=0;
    while(i<3)
    {
       if(S.charAt(i)=='R')
       {c++;c1++;}
       else
       {
         if(c==1)
         c=0;
        }
      i++;
    }
     if(c==0&&c1==1)
       c=c1;
    System.out.println(c);
    } int c c i i c1; c1 String S; S BufferedReader br= new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) S=br.readLine() S br.readLine() br.readLine br i=0 i 0 c=0 c 0 c1=0 c1 0 while(i<3)
    {
       if(S.charAt(i)=='R')
       {c++;c1++;}
       else
       {
         if(c==1)
         c=0;
        }
      i++;
    } i<3 i 3 {
       if(S.charAt(i)=='R')
       {c++;c1++;}
       else
       {
         if(c==1)
         c=0;
        }
      i++;
    } if(S.charAt(i)=='R')
       {c++;c1++;}
       else
       {
         if(c==1)
         c=0;
        } S.charAt(i)=='R' S.charAt(i) S.charAt S i 'R' {c++;c1++;} c++ c c1++ c1 {
         if(c==1)
         c=0;
        } if(c==1)
         c=0; c==1 c 1 c=0 c 0 i++ i if(c==0&&c1==1)
       c=c1; c==0&&c1==1 c==0 c 0 c1==1 c1 1 c=c1 c c1 System.out.println(c) System.out.println System.out System System.out c String args[] args
import java.io.*;
class Main 
{
    public static void main(String args[])throws IOException
    {
    int c,i,c1;
    String S;
    BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
    S=br.readLine();
    i=0;c=0;c1=0;
    while(i<3)
    {
       if(S.charAt(i)=='R')
       {c++;c1++;}
       else
       {
         if(c==1)
         c=0;
        }
      i++;
    }
     if(c==0&&c1==1)
       c=c1;
    System.out.println(c);
    }
}