import java.util.*;

public class Main
{
    public static void main(String[] args)
    {
        //long start = System.currentTimeMillis();
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count = 0;
        int max = 0;
        for (int i = 0;i<3;++i)
        {
            String ss = s.substring(i,i+1);
            if (ss.equals("R")) ++count;
            else
            {
                max = Math.max(count,max);
                count = 0;
            }
        }
        max = Math.max(count,max);
        System.out.println(max);
        sc.close();
//        long end = System.currentTimeMillis();
//        System.err.println((end-start)+"ms");
    }
} import java.util.*; util.* java public class Main
{
    public static void main(String[] args)
    {
        //long start = System.currentTimeMillis();
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count = 0;
        int max = 0;
        for (int i = 0;i<3;++i)
        {
            String ss = s.substring(i,i+1);
            if (ss.equals("R")) ++count;
            else
            {
                max = Math.max(count,max);
                count = 0;
            }
        }
        max = Math.max(count,max);
        System.out.println(max);
        sc.close();
//        long end = System.currentTimeMillis();
//        System.err.println((end-start)+"ms");
    }
} Main public static void main(String[] args)
    {
        //long start = System.currentTimeMillis();
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count = 0;
        int max = 0;
        for (int i = 0;i<3;++i)
        {
            String ss = s.substring(i,i+1);
            if (ss.equals("R")) ++count;
            else
            {
                max = Math.max(count,max);
                count = 0;
            }
        }
        max = Math.max(count,max);
        System.out.println(max);
        sc.close();
//        long end = System.currentTimeMillis();
//        System.err.println((end-start)+"ms");
    } main {
        //long start = System.currentTimeMillis();
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count = 0;
        int max = 0;
        for (int i = 0;i<3;++i)
        {
            String ss = s.substring(i,i+1);
            if (ss.equals("R")) ++count;
            else
            {
                max = Math.max(count,max);
                count = 0;
            }
        }
        max = Math.max(count,max);
        System.out.println(max);
        sc.close();
//        long end = System.currentTimeMillis();
//        System.err.println((end-start)+"ms");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int count = 0; count 0 int max = 0; max 0 for (int i = 0;i<3;++i)
        {
            String ss = s.substring(i,i+1);
            if (ss.equals("R")) ++count;
            else
            {
                max = Math.max(count,max);
                count = 0;
            }
        } int i = 0; int i = 0; i 0 i<3 i 3 ++i ++i i {
            String ss = s.substring(i,i+1);
            if (ss.equals("R")) ++count;
            else
            {
                max = Math.max(count,max);
                count = 0;
            }
        } {
            String ss = s.substring(i,i+1);
            if (ss.equals("R")) ++count;
            else
            {
                max = Math.max(count,max);
                count = 0;
            }
        } String ss = s.substring(i,i+1); ss s.substring(i,i+1) s.substring s i i+1 i 1 if (ss.equals("R")) ++count;
            else
            {
                max = Math.max(count,max);
                count = 0;
            } ss.equals("R") ss.equals ss "R" ++count count {
                max = Math.max(count,max);
                count = 0;
            } max = Math.max(count,max) max Math.max(count,max) Math.max Math count max count = 0 count 0 max = Math.max(count,max) max Math.max(count,max) Math.max Math count max System.out.println(max) System.out.println System.out System System.out max sc.close() sc.close sc String[] args args public class Main
{
    public static void main(String[] args)
    {
        //long start = System.currentTimeMillis();
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count = 0;
        int max = 0;
        for (int i = 0;i<3;++i)
        {
            String ss = s.substring(i,i+1);
            if (ss.equals("R")) ++count;
            else
            {
                max = Math.max(count,max);
                count = 0;
            }
        }
        max = Math.max(count,max);
        System.out.println(max);
        sc.close();
//        long end = System.currentTimeMillis();
//        System.err.println((end-start)+"ms");
    }
} public class Main
{
    public static void main(String[] args)
    {
        //long start = System.currentTimeMillis();
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count = 0;
        int max = 0;
        for (int i = 0;i<3;++i)
        {
            String ss = s.substring(i,i+1);
            if (ss.equals("R")) ++count;
            else
            {
                max = Math.max(count,max);
                count = 0;
            }
        }
        max = Math.max(count,max);
        System.out.println(max);
        sc.close();
//        long end = System.currentTimeMillis();
//        System.err.println((end-start)+"ms");
    }
} Main
import java.util.*;

public class Main
{
    public static void main(String[] args)
    {
        //long start = System.currentTimeMillis();
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count = 0;
        int max = 0;
        for (int i = 0;i<3;++i)
        {
            String ss = s.substring(i,i+1);
            if (ss.equals("R")) ++count;
            else
            {
                max = Math.max(count,max);
                count = 0;
            }
        }
        max = Math.max(count,max);
        System.out.println(max);
        sc.close();
//        long end = System.currentTimeMillis();
//        System.err.println((end-start)+"ms");
    }
}