import java.util.*;
import java.io.*;
public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        String s=br.readLine();
        int max=0,cnt=0;
        for(int i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='R')
            cnt++;
            else
            cnt=0;
            max=Math.max(max,cnt);
        }
        pw.println(max);
        pw.flush();
        pw.close();
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        String s=br.readLine();
        int max=0,cnt=0;
        for(int i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='R')
            cnt++;
            else
            cnt=0;
            max=Math.max(max,cnt);
        }
        pw.println(max);
        pw.flush();
        pw.close();
    }
} Main public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        String s=br.readLine();
        int max=0,cnt=0;
        for(int i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='R')
            cnt++;
            else
            cnt=0;
            max=Math.max(max,cnt);
        }
        pw.println(max);
        pw.flush();
        pw.close();
    } main {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        String s=br.readLine();
        int max=0,cnt=0;
        for(int i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='R')
            cnt++;
            else
            cnt=0;
            max=Math.max(max,cnt);
        }
        pw.println(max);
        pw.flush();
        pw.close();
    } BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) PrintWriter pw=new PrintWriter(System.out); pw new PrintWriter(System.out) String s=br.readLine(); s br.readLine() br.readLine br int max=0 max 0 cnt=0; cnt 0 for(int i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='R')
            cnt++;
            else
            cnt=0;
            max=Math.max(max,cnt);
        } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
            if(s.charAt(i)=='R')
            cnt++;
            else
            cnt=0;
            max=Math.max(max,cnt);
        } {
            if(s.charAt(i)=='R')
            cnt++;
            else
            cnt=0;
            max=Math.max(max,cnt);
        } if(s.charAt(i)=='R')
            cnt++;
            else
            cnt=0; s.charAt(i)=='R' s.charAt(i) s.charAt s i 'R' cnt++ cnt cnt=0 cnt 0 max=Math.max(max,cnt) max Math.max(max,cnt) Math.max Math max cnt pw.println(max) pw.println pw max pw.flush() pw.flush pw pw.close() pw.close pw String args[] args public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        String s=br.readLine();
        int max=0,cnt=0;
        for(int i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='R')
            cnt++;
            else
            cnt=0;
            max=Math.max(max,cnt);
        }
        pw.println(max);
        pw.flush();
        pw.close();
    }
} public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        String s=br.readLine();
        int max=0,cnt=0;
        for(int i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='R')
            cnt++;
            else
            cnt=0;
            max=Math.max(max,cnt);
        }
        pw.println(max);
        pw.flush();
        pw.close();
    }
} Main
import java.util.*;
import java.io.*;
public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        String s=br.readLine();
        int max=0,cnt=0;
        for(int i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='R')
            cnt++;
            else
            cnt=0;
            max=Math.max(max,cnt);
        }
        pw.println(max);
        pw.flush();
        pw.close();
    }
}