import java.util.Scanner;

public class Main 
{
    public static void main( String[] args )
    {
        try (Scanner scan = new Scanner(System.in)) {
            String input = scan.nextLine();
            int rain = 0, repeat = 0;
            for (char c : input.toCharArray()) {
                if (c == 'R') repeat++;
                else repeat = 0;
                if (rain < repeat) rain = repeat;
            }
            System.out.println(rain);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main 
{
    public static void main( String[] args )
    {
        try (Scanner scan = new Scanner(System.in)) {
            String input = scan.nextLine();
            int rain = 0, repeat = 0;
            for (char c : input.toCharArray()) {
                if (c == 'R') repeat++;
                else repeat = 0;
                if (rain < repeat) rain = repeat;
            }
            System.out.println(rain);
        }
    }
} Main public static void main( String[] args )
    {
        try (Scanner scan = new Scanner(System.in)) {
            String input = scan.nextLine();
            int rain = 0, repeat = 0;
            for (char c : input.toCharArray()) {
                if (c == 'R') repeat++;
                else repeat = 0;
                if (rain < repeat) rain = repeat;
            }
            System.out.println(rain);
        }
    } main {
        try (Scanner scan = new Scanner(System.in)) {
            String input = scan.nextLine();
            int rain = 0, repeat = 0;
            for (char c : input.toCharArray()) {
                if (c == 'R') repeat++;
                else repeat = 0;
                if (rain < repeat) rain = repeat;
            }
            System.out.println(rain);
        }
    } try (Scanner scan = new Scanner(System.in)) {
            String input = scan.nextLine();
            int rain = 0, repeat = 0;
            for (char c : input.toCharArray()) {
                if (c == 'R') repeat++;
                else repeat = 0;
                if (rain < repeat) rain = repeat;
            }
            System.out.println(rain);
        } {
            String input = scan.nextLine();
            int rain = 0, repeat = 0;
            for (char c : input.toCharArray()) {
                if (c == 'R') repeat++;
                else repeat = 0;
                if (rain < repeat) rain = repeat;
            }
            System.out.println(rain);
        } Scanner scan = new Scanner(System.in) Scanner scan = new Scanner(System.in) new Scanner(System.in) String input = scan.nextLine(); input scan.nextLine() scan.nextLine scan int rain = 0 rain 0 repeat = 0; repeat 0 for (char c : input.toCharArray()) {
                if (c == 'R') repeat++;
                else repeat = 0;
                if (rain < repeat) rain = repeat;
            } char c input.toCharArray() input.toCharArray input {
                if (c == 'R') repeat++;
                else repeat = 0;
                if (rain < repeat) rain = repeat;
            } {
                if (c == 'R') repeat++;
                else repeat = 0;
                if (rain < repeat) rain = repeat;
            } if (c == 'R') repeat++;
                else repeat = 0; c == 'R' c 'R' repeat++ repeat repeat = 0 repeat 0 if (rain < repeat) rain = repeat; rain < repeat rain repeat rain = repeat rain repeat System.out.println(rain) System.out.println System.out System System.out rain String[] args args public class Main 
{
    public static void main( String[] args )
    {
        try (Scanner scan = new Scanner(System.in)) {
            String input = scan.nextLine();
            int rain = 0, repeat = 0;
            for (char c : input.toCharArray()) {
                if (c == 'R') repeat++;
                else repeat = 0;
                if (rain < repeat) rain = repeat;
            }
            System.out.println(rain);
        }
    }
} public class Main 
{
    public static void main( String[] args )
    {
        try (Scanner scan = new Scanner(System.in)) {
            String input = scan.nextLine();
            int rain = 0, repeat = 0;
            for (char c : input.toCharArray()) {
                if (c == 'R') repeat++;
                else repeat = 0;
                if (rain < repeat) rain = repeat;
            }
            System.out.println(rain);
        }
    }
} Main
import java.util.Scanner;

public class Main 
{
    public static void main( String[] args )
    {
        try (Scanner scan = new Scanner(System.in)) {
            String input = scan.nextLine();
            int rain = 0, repeat = 0;
            for (char c : input.toCharArray()) {
                if (c == 'R') repeat++;
                else repeat = 0;
                if (rain < repeat) rain = repeat;
            }
            System.out.println(rain);
        }
    }
}