import java.util.Scanner;

public class Main {
        public static void main(String[] args) {
                Scanner scan = new Scanner(System.in);

                String S = scan.next();


                int count = 0;
                int max = 0;

                for (int i = 0; i < 3; i++) {
                	if (S.substring(i,i+1).equals("R")) {
                		count++;
                		if (max < count) {
                			max = count;
                		}
                	} else {
                		if (max < count) {
                			max = count;
                		}
                		count = 0;
                	}
                }

                System.out.println(max);

                scan.close();

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

                String S = scan.next();


                int count = 0;
                int max = 0;

                for (int i = 0; i < 3; i++) {
                	if (S.substring(i,i+1).equals("R")) {
                		count++;
                		if (max < count) {
                			max = count;
                		}
                	} else {
                		if (max < count) {
                			max = count;
                		}
                		count = 0;
                	}
                }

                System.out.println(max);

                scan.close();

        }
} Main public static void main(String[] args) {
                Scanner scan = new Scanner(System.in);

                String S = scan.next();


                int count = 0;
                int max = 0;

                for (int i = 0; i < 3; i++) {
                	if (S.substring(i,i+1).equals("R")) {
                		count++;
                		if (max < count) {
                			max = count;
                		}
                	} else {
                		if (max < count) {
                			max = count;
                		}
                		count = 0;
                	}
                }

                System.out.println(max);

                scan.close();

        } main {
                Scanner scan = new Scanner(System.in);

                String S = scan.next();


                int count = 0;
                int max = 0;

                for (int i = 0; i < 3; i++) {
                	if (S.substring(i,i+1).equals("R")) {
                		count++;
                		if (max < count) {
                			max = count;
                		}
                	} else {
                		if (max < count) {
                			max = count;
                		}
                		count = 0;
                	}
                }

                System.out.println(max);

                scan.close();

        } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String S = scan.next(); S scan.next() scan.next scan int count = 0; count 0 int max = 0; max 0 for (int i = 0; i < 3; i++) {
                	if (S.substring(i,i+1).equals("R")) {
                		count++;
                		if (max < count) {
                			max = count;
                		}
                	} else {
                		if (max < count) {
                			max = count;
                		}
                		count = 0;
                	}
                } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
                	if (S.substring(i,i+1).equals("R")) {
                		count++;
                		if (max < count) {
                			max = count;
                		}
                	} else {
                		if (max < count) {
                			max = count;
                		}
                		count = 0;
                	}
                } {
                	if (S.substring(i,i+1).equals("R")) {
                		count++;
                		if (max < count) {
                			max = count;
                		}
                	} else {
                		if (max < count) {
                			max = count;
                		}
                		count = 0;
                	}
                } if (S.substring(i,i+1).equals("R")) {
                		count++;
                		if (max < count) {
                			max = count;
                		}
                	} else {
                		if (max < count) {
                			max = count;
                		}
                		count = 0;
                	} S.substring(i,i+1).equals("R") S.substring(i,i+1).equals S.substring(i,i+1) S.substring S i i+1 i 1 "R" {
                		count++;
                		if (max < count) {
                			max = count;
                		}
                	} count++ count if (max < count) {
                			max = count;
                		} max < count max count {
                			max = count;
                		} max = count max count {
                		if (max < count) {
                			max = count;
                		}
                		count = 0;
                	} if (max < count) {
                			max = count;
                		} max < count max count {
                			max = count;
                		} max = count max count count = 0 count 0 System.out.println(max) System.out.println System.out System System.out max scan.close() scan.close scan String[] args args public class Main {
        public static void main(String[] args) {
                Scanner scan = new Scanner(System.in);

                String S = scan.next();


                int count = 0;
                int max = 0;

                for (int i = 0; i < 3; i++) {
                	if (S.substring(i,i+1).equals("R")) {
                		count++;
                		if (max < count) {
                			max = count;
                		}
                	} else {
                		if (max < count) {
                			max = count;
                		}
                		count = 0;
                	}
                }

                System.out.println(max);

                scan.close();

        }
} public class Main {
        public static void main(String[] args) {
                Scanner scan = new Scanner(System.in);

                String S = scan.next();


                int count = 0;
                int max = 0;

                for (int i = 0; i < 3; i++) {
                	if (S.substring(i,i+1).equals("R")) {
                		count++;
                		if (max < count) {
                			max = count;
                		}
                	} else {
                		if (max < count) {
                			max = count;
                		}
                		count = 0;
                	}
                }

                System.out.println(max);

                scan.close();

        }
} Main
import java.util.Scanner;

public class Main {
        public static void main(String[] args) {
                Scanner scan = new Scanner(System.in);

                String S = scan.next();


                int count = 0;
                int max = 0;

                for (int i = 0; i < 3; i++) {
                	if (S.substring(i,i+1).equals("R")) {
                		count++;
                		if (max < count) {
                			max = count;
                		}
                	} else {
                		if (max < count) {
                			max = count;
                		}
                		count = 0;
                	}
                }

                System.out.println(max);

                scan.close();

        }
}