
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                int count=1;
                String rain;
                rain=scan.nextLine();
                if(rain.charAt(0)=='S' && rain.charAt(1)=='S' && rain.charAt(2)=='S'){
                    System.out.print(0);
                }else {
                    for (int i = 1; i < rain.length(); i++) {
                        if (rain.charAt(i) == 'R' && rain.charAt(i - 1) == 'R') {
                            count++;
                        }
                    }
                    System.out.print(count);
                }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                int count=1;
                String rain;
                rain=scan.nextLine();
                if(rain.charAt(0)=='S' && rain.charAt(1)=='S' && rain.charAt(2)=='S'){
                    System.out.print(0);
                }else {
                    for (int i = 1; i < rain.length(); i++) {
                        if (rain.charAt(i) == 'R' && rain.charAt(i - 1) == 'R') {
                            count++;
                        }
                    }
                    System.out.print(count);
                }
    }
} Main public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                int count=1;
                String rain;
                rain=scan.nextLine();
                if(rain.charAt(0)=='S' && rain.charAt(1)=='S' && rain.charAt(2)=='S'){
                    System.out.print(0);
                }else {
                    for (int i = 1; i < rain.length(); i++) {
                        if (rain.charAt(i) == 'R' && rain.charAt(i - 1) == 'R') {
                            count++;
                        }
                    }
                    System.out.print(count);
                }
    } main {
                Scanner scan = new Scanner(System.in);
                int count=1;
                String rain;
                rain=scan.nextLine();
                if(rain.charAt(0)=='S' && rain.charAt(1)=='S' && rain.charAt(2)=='S'){
                    System.out.print(0);
                }else {
                    for (int i = 1; i < rain.length(); i++) {
                        if (rain.charAt(i) == 'R' && rain.charAt(i - 1) == 'R') {
                            count++;
                        }
                    }
                    System.out.print(count);
                }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int count=1; count 1 String rain; rain rain=scan.nextLine() rain scan.nextLine() scan.nextLine scan if(rain.charAt(0)=='S' && rain.charAt(1)=='S' && rain.charAt(2)=='S'){
                    System.out.print(0);
                }else {
                    for (int i = 1; i < rain.length(); i++) {
                        if (rain.charAt(i) == 'R' && rain.charAt(i - 1) == 'R') {
                            count++;
                        }
                    }
                    System.out.print(count);
                } rain.charAt(0)=='S' && rain.charAt(1)=='S' && rain.charAt(2)=='S' rain.charAt(0)=='S' && rain.charAt(1)=='S' && rain.charAt(2)=='S' rain.charAt(0)=='S' rain.charAt(0) rain.charAt rain 0 'S' rain.charAt(1)=='S' rain.charAt(1) rain.charAt rain 1 'S' rain.charAt(2)=='S' rain.charAt(2) rain.charAt rain 2 'S' {
                    System.out.print(0);
                } System.out.print(0) System.out.print System.out System System.out 0 {
                    for (int i = 1; i < rain.length(); i++) {
                        if (rain.charAt(i) == 'R' && rain.charAt(i - 1) == 'R') {
                            count++;
                        }
                    }
                    System.out.print(count);
                } for (int i = 1; i < rain.length(); i++) {
                        if (rain.charAt(i) == 'R' && rain.charAt(i - 1) == 'R') {
                            count++;
                        }
                    } int i = 1; int i = 1; i 1 i < rain.length() i rain.length() rain.length rain i++ i++ i {
                        if (rain.charAt(i) == 'R' && rain.charAt(i - 1) == 'R') {
                            count++;
                        }
                    } {
                        if (rain.charAt(i) == 'R' && rain.charAt(i - 1) == 'R') {
                            count++;
                        }
                    } if (rain.charAt(i) == 'R' && rain.charAt(i - 1) == 'R') {
                            count++;
                        } rain.charAt(i) == 'R' && rain.charAt(i - 1) == 'R' rain.charAt(i) == 'R' rain.charAt(i) rain.charAt rain i 'R' rain.charAt(i - 1) == 'R' rain.charAt(i - 1) rain.charAt rain i - 1 i 1 'R' {
                            count++;
                        } count++ count System.out.print(count) System.out.print System.out System System.out count String[] args args public class Main {
    public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                int count=1;
                String rain;
                rain=scan.nextLine();
                if(rain.charAt(0)=='S' && rain.charAt(1)=='S' && rain.charAt(2)=='S'){
                    System.out.print(0);
                }else {
                    for (int i = 1; i < rain.length(); i++) {
                        if (rain.charAt(i) == 'R' && rain.charAt(i - 1) == 'R') {
                            count++;
                        }
                    }
                    System.out.print(count);
                }
    }
} public class Main {
    public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                int count=1;
                String rain;
                rain=scan.nextLine();
                if(rain.charAt(0)=='S' && rain.charAt(1)=='S' && rain.charAt(2)=='S'){
                    System.out.print(0);
                }else {
                    for (int i = 1; i < rain.length(); i++) {
                        if (rain.charAt(i) == 'R' && rain.charAt(i - 1) == 'R') {
                            count++;
                        }
                    }
                    System.out.print(count);
                }
    }
} Main

import java.util.Scanner;
public class Main {
    public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                int count=1;
                String rain;
                rain=scan.nextLine();
                if(rain.charAt(0)=='S' && rain.charAt(1)=='S' && rain.charAt(2)=='S'){
                    System.out.print(0);
                }else {
                    for (int i = 1; i < rain.length(); i++) {
                        if (rain.charAt(i) == 'R' && rain.charAt(i - 1) == 'R') {
                            count++;
                        }
                    }
                    System.out.print(count);
                }
    }
}
