import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] ch = str.toCharArray();
        int i = 0;
        int maxcount = 0;
        while(i < ch.length) {
            if(ch[i] != 'R') {
                i++;
                continue;
            }
            int count= 0;
            while ( i < ch.length && ch[i] == 'R') {
                count++;
                i++;
            }

            maxcount = Math.max(maxcount, count);
            i++;
        }

        System.out.println(maxcount);
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] ch = str.toCharArray();
        int i = 0;
        int maxcount = 0;
        while(i < ch.length) {
            if(ch[i] != 'R') {
                i++;
                continue;
            }
            int count= 0;
            while ( i < ch.length && ch[i] == 'R') {
                count++;
                i++;
            }

            maxcount = Math.max(maxcount, count);
            i++;
        }

        System.out.println(maxcount);
    }

} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] ch = str.toCharArray();
        int i = 0;
        int maxcount = 0;
        while(i < ch.length) {
            if(ch[i] != 'R') {
                i++;
                continue;
            }
            int count= 0;
            while ( i < ch.length && ch[i] == 'R') {
                count++;
                i++;
            }

            maxcount = Math.max(maxcount, count);
            i++;
        }

        System.out.println(maxcount);
    } main {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] ch = str.toCharArray();
        int i = 0;
        int maxcount = 0;
        while(i < ch.length) {
            if(ch[i] != 'R') {
                i++;
                continue;
            }
            int count= 0;
            while ( i < ch.length && ch[i] == 'R') {
                count++;
                i++;
            }

            maxcount = Math.max(maxcount, count);
            i++;
        }

        System.out.println(maxcount);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) String str = s.next(); str s.next() s.next s char[] ch = str.toCharArray(); ch str.toCharArray() str.toCharArray str int i = 0; i 0 int maxcount = 0; maxcount 0 while(i < ch.length) {
            if(ch[i] != 'R') {
                i++;
                continue;
            }
            int count= 0;
            while ( i < ch.length && ch[i] == 'R') {
                count++;
                i++;
            }

            maxcount = Math.max(maxcount, count);
            i++;
        } i < ch.length i ch.length ch ch.length {
            if(ch[i] != 'R') {
                i++;
                continue;
            }
            int count= 0;
            while ( i < ch.length && ch[i] == 'R') {
                count++;
                i++;
            }

            maxcount = Math.max(maxcount, count);
            i++;
        } if(ch[i] != 'R') {
                i++;
                continue;
            } ch[i] != 'R' ch[i] ch i 'R' {
                i++;
                continue;
            } i++ i continue; int count= 0; count 0 while ( i < ch.length && ch[i] == 'R') {
                count++;
                i++;
            } i < ch.length && ch[i] == 'R' i < ch.length i ch.length ch ch.length ch[i] == 'R' ch[i] ch i 'R' {
                count++;
                i++;
            } count++ count i++ i maxcount = Math.max(maxcount, count) maxcount Math.max(maxcount, count) Math.max Math maxcount count i++ i System.out.println(maxcount) System.out.println System.out System System.out maxcount String[] args args public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] ch = str.toCharArray();
        int i = 0;
        int maxcount = 0;
        while(i < ch.length) {
            if(ch[i] != 'R') {
                i++;
                continue;
            }
            int count= 0;
            while ( i < ch.length && ch[i] == 'R') {
                count++;
                i++;
            }

            maxcount = Math.max(maxcount, count);
            i++;
        }

        System.out.println(maxcount);
    }

} public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] ch = str.toCharArray();
        int i = 0;
        int maxcount = 0;
        while(i < ch.length) {
            if(ch[i] != 'R') {
                i++;
                continue;
            }
            int count= 0;
            while ( i < ch.length && ch[i] == 'R') {
                count++;
                i++;
            }

            maxcount = Math.max(maxcount, count);
            i++;
        }

        System.out.println(maxcount);
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] ch = str.toCharArray();
        int i = 0;
        int maxcount = 0;
        while(i < ch.length) {
            if(ch[i] != 'R') {
                i++;
                continue;
            }
            int count= 0;
            while ( i < ch.length && ch[i] == 'R') {
                count++;
                i++;
            }

            maxcount = Math.max(maxcount, count);
            i++;
        }

        System.out.println(maxcount);
    }

}
