

import java.util.*;
import java.lang.*;
import java.io.*;

public class Main
{
    public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        String str = s.next();
        int max = 0;
        int c = 0;
        for(int j=0; j<str.length(); j++)
        {
            if(str.charAt(j)=='R')
                c++;
            else
            {
                if(c>max)
                    max = c;
                c = 0;
            }
        }
        if(c>max)
            max = c;
        c = 0;
        System.out.println(max);
    }
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main
{
    public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        String str = s.next();
        int max = 0;
        int c = 0;
        for(int j=0; j<str.length(); j++)
        {
            if(str.charAt(j)=='R')
                c++;
            else
            {
                if(c>max)
                    max = c;
                c = 0;
            }
        }
        if(c>max)
            max = c;
        c = 0;
        System.out.println(max);
    }
} Main public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        String str = s.next();
        int max = 0;
        int c = 0;
        for(int j=0; j<str.length(); j++)
        {
            if(str.charAt(j)=='R')
                c++;
            else
            {
                if(c>max)
                    max = c;
                c = 0;
            }
        }
        if(c>max)
            max = c;
        c = 0;
        System.out.println(max);
    } main {
        // your code goes here
        Scanner s = new Scanner(System.in);
        String str = s.next();
        int max = 0;
        int c = 0;
        for(int j=0; j<str.length(); j++)
        {
            if(str.charAt(j)=='R')
                c++;
            else
            {
                if(c>max)
                    max = c;
                c = 0;
            }
        }
        if(c>max)
            max = c;
        c = 0;
        System.out.println(max);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) String str = s.next(); str s.next() s.next s int max = 0; max 0 int c = 0; c 0 for(int j=0; j<str.length(); j++)
        {
            if(str.charAt(j)=='R')
                c++;
            else
            {
                if(c>max)
                    max = c;
                c = 0;
            }
        } int j=0; int j=0; j 0 j<str.length() j str.length() str.length str j++ j++ j {
            if(str.charAt(j)=='R')
                c++;
            else
            {
                if(c>max)
                    max = c;
                c = 0;
            }
        } {
            if(str.charAt(j)=='R')
                c++;
            else
            {
                if(c>max)
                    max = c;
                c = 0;
            }
        } if(str.charAt(j)=='R')
                c++;
            else
            {
                if(c>max)
                    max = c;
                c = 0;
            } str.charAt(j)=='R' str.charAt(j) str.charAt str j 'R' c++ c {
                if(c>max)
                    max = c;
                c = 0;
            } if(c>max)
                    max = c; c>max c max max = c max c c = 0 c 0 if(c>max)
            max = c; c>max c max max = c max c c = 0 c 0 System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main
{
    public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        String str = s.next();
        int max = 0;
        int c = 0;
        for(int j=0; j<str.length(); j++)
        {
            if(str.charAt(j)=='R')
                c++;
            else
            {
                if(c>max)
                    max = c;
                c = 0;
            }
        }
        if(c>max)
            max = c;
        c = 0;
        System.out.println(max);
    }
} public class Main
{
    public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        String str = s.next();
        int max = 0;
        int c = 0;
        for(int j=0; j<str.length(); j++)
        {
            if(str.charAt(j)=='R')
                c++;
            else
            {
                if(c>max)
                    max = c;
                c = 0;
            }
        }
        if(c>max)
            max = c;
        c = 0;
        System.out.println(max);
    }
} Main


import java.util.*;
import java.lang.*;
import java.io.*;

public class Main
{
    public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        String str = s.next();
        int max = 0;
        int c = 0;
        for(int j=0; j<str.length(); j++)
        {
            if(str.charAt(j)=='R')
                c++;
            else
            {
                if(c>max)
                    max = c;
                c = 0;
            }
        }
        if(c>max)
            max = c;
        c = 0;
        System.out.println(max);
    }
}