import java.util.Scanner;

/*

*/

public class Main {
    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String[] b = a.split("");

        int count = 0;
        if (a.equals("RRR")) {
            count = 3;
        } else if (a.contains("RR")) {
            count = 2;
        } else if (a.contains("R")) {
            count = 1;
        }
        // for (int i = 0; i < b.length; i++) {
        //     if (b[i].equals("R")) {
        //         count++;
        //     }
        // }
            System.out.println(count);
        // }

    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String[] b = a.split("");

        int count = 0;
        if (a.equals("RRR")) {
            count = 3;
        } else if (a.contains("RR")) {
            count = 2;
        } else if (a.contains("R")) {
            count = 1;
        }
        // for (int i = 0; i < b.length; i++) {
        //     if (b[i].equals("R")) {
        //         count++;
        //     }
        // }
            System.out.println(count);
        // }

    }
} Main public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String[] b = a.split("");

        int count = 0;
        if (a.equals("RRR")) {
            count = 3;
        } else if (a.contains("RR")) {
            count = 2;
        } else if (a.contains("R")) {
            count = 1;
        }
        // for (int i = 0; i < b.length; i++) {
        //     if (b[i].equals("R")) {
        //         count++;
        //     }
        // }
            System.out.println(count);
        // }

    } main {

        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String[] b = a.split("");

        int count = 0;
        if (a.equals("RRR")) {
            count = 3;
        } else if (a.contains("RR")) {
            count = 2;
        } else if (a.contains("R")) {
            count = 1;
        }
        // for (int i = 0; i < b.length; i++) {
        //     if (b[i].equals("R")) {
        //         count++;
        //     }
        // }
            System.out.println(count);
        // }

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc String[] b = a.split(""); b a.split("") a.split a "" int count = 0; count 0 if (a.equals("RRR")) {
            count = 3;
        } else if (a.contains("RR")) {
            count = 2;
        } else if (a.contains("R")) {
            count = 1;
        } a.equals("RRR") a.equals a "RRR" {
            count = 3;
        } count = 3 count 3 if (a.contains("RR")) {
            count = 2;
        } else if (a.contains("R")) {
            count = 1;
        } a.contains("RR") a.contains a "RR" {
            count = 2;
        } count = 2 count 2 if (a.contains("R")) {
            count = 1;
        } a.contains("R") a.contains a "R" {
            count = 1;
        } count = 1 count 1 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String[] b = a.split("");

        int count = 0;
        if (a.equals("RRR")) {
            count = 3;
        } else if (a.contains("RR")) {
            count = 2;
        } else if (a.contains("R")) {
            count = 1;
        }
        // for (int i = 0; i < b.length; i++) {
        //     if (b[i].equals("R")) {
        //         count++;
        //     }
        // }
            System.out.println(count);
        // }

    }
} public class Main {
    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String[] b = a.split("");

        int count = 0;
        if (a.equals("RRR")) {
            count = 3;
        } else if (a.contains("RR")) {
            count = 2;
        } else if (a.contains("R")) {
            count = 1;
        }
        // for (int i = 0; i < b.length; i++) {
        //     if (b[i].equals("R")) {
        //         count++;
        //     }
        // }
            System.out.println(count);
        // }

    }
} Main
import java.util.Scanner;

/*

*/

public class Main {
    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String[] b = a.split("");

        int count = 0;
        if (a.equals("RRR")) {
            count = 3;
        } else if (a.contains("RR")) {
            count = 2;
        } else if (a.contains("R")) {
            count = 1;
        }
        // for (int i = 0; i < b.length; i++) {
        //     if (b[i].equals("R")) {
        //         count++;
        //     }
        // }
            System.out.println(count);
        // }

    }
}