import java.util.*;
public class Main {
	public static void main(String[] args){
        Main main = new Main();
        main.input();
        main.solve();
        main.output();
    }

    String f;
    int result;

    private void input() {
        Scanner sc = new Scanner(System.in);
        f = sc.next();
        result = 0;
    }

    private void solve() {
        if (f.equals("RRR")) {
            result = 3;
        } else if (f.equals("SRR") || f.equals("RRS")) {
            result = 2;
        } else if (f.contains("R")) {
            result = 1;
        } else {
            result = 0;
        }
    }

    private void output() {
        System.out.println(result);
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
        Main main = new Main();
        main.input();
        main.solve();
        main.output();
    }

    String f;
    int result;

    private void input() {
        Scanner sc = new Scanner(System.in);
        f = sc.next();
        result = 0;
    }

    private void solve() {
        if (f.equals("RRR")) {
            result = 3;
        } else if (f.equals("SRR") || f.equals("RRS")) {
            result = 2;
        } else if (f.contains("R")) {
            result = 1;
        } else {
            result = 0;
        }
    }

    private void output() {
        System.out.println(result);
    }
} Main String f; f int result; result public static void main(String[] args){
        Main main = new Main();
        main.input();
        main.solve();
        main.output();
    } main {
        Main main = new Main();
        main.input();
        main.solve();
        main.output();
    } Main main = new Main(); main new Main() main.input() main.input main main.solve() main.solve main main.output() main.output main String[] args args private void input() {
        Scanner sc = new Scanner(System.in);
        f = sc.next();
        result = 0;
    } input {
        Scanner sc = new Scanner(System.in);
        f = sc.next();
        result = 0;
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) f = sc.next() f sc.next() sc.next sc result = 0 result 0 private void solve() {
        if (f.equals("RRR")) {
            result = 3;
        } else if (f.equals("SRR") || f.equals("RRS")) {
            result = 2;
        } else if (f.contains("R")) {
            result = 1;
        } else {
            result = 0;
        }
    } solve {
        if (f.equals("RRR")) {
            result = 3;
        } else if (f.equals("SRR") || f.equals("RRS")) {
            result = 2;
        } else if (f.contains("R")) {
            result = 1;
        } else {
            result = 0;
        }
    } if (f.equals("RRR")) {
            result = 3;
        } else if (f.equals("SRR") || f.equals("RRS")) {
            result = 2;
        } else if (f.contains("R")) {
            result = 1;
        } else {
            result = 0;
        } f.equals("RRR") f.equals f "RRR" {
            result = 3;
        } result = 3 result 3 if (f.equals("SRR") || f.equals("RRS")) {
            result = 2;
        } else if (f.contains("R")) {
            result = 1;
        } else {
            result = 0;
        } f.equals("SRR") || f.equals("RRS") f.equals("SRR") f.equals f "SRR" f.equals("RRS") f.equals f "RRS" {
            result = 2;
        } result = 2 result 2 if (f.contains("R")) {
            result = 1;
        } else {
            result = 0;
        } f.contains("R") f.contains f "R" {
            result = 1;
        } result = 1 result 1 {
            result = 0;
        } result = 0 result 0 private void output() {
        System.out.println(result);
    } output {
        System.out.println(result);
    } System.out.println(result) System.out.println System.out System System.out result public class Main {
	public static void main(String[] args){
        Main main = new Main();
        main.input();
        main.solve();
        main.output();
    }

    String f;
    int result;

    private void input() {
        Scanner sc = new Scanner(System.in);
        f = sc.next();
        result = 0;
    }

    private void solve() {
        if (f.equals("RRR")) {
            result = 3;
        } else if (f.equals("SRR") || f.equals("RRS")) {
            result = 2;
        } else if (f.contains("R")) {
            result = 1;
        } else {
            result = 0;
        }
    }

    private void output() {
        System.out.println(result);
    }
} public class Main {
	public static void main(String[] args){
        Main main = new Main();
        main.input();
        main.solve();
        main.output();
    }

    String f;
    int result;

    private void input() {
        Scanner sc = new Scanner(System.in);
        f = sc.next();
        result = 0;
    }

    private void solve() {
        if (f.equals("RRR")) {
            result = 3;
        } else if (f.equals("SRR") || f.equals("RRS")) {
            result = 2;
        } else if (f.contains("R")) {
            result = 1;
        } else {
            result = 0;
        }
    }

    private void output() {
        System.out.println(result);
    }
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
        Main main = new Main();
        main.input();
        main.solve();
        main.output();
    }

    String f;
    int result;

    private void input() {
        Scanner sc = new Scanner(System.in);
        f = sc.next();
        result = 0;
    }

    private void solve() {
        if (f.equals("RRR")) {
            result = 3;
        } else if (f.equals("SRR") || f.equals("RRS")) {
            result = 2;
        } else if (f.contains("R")) {
            result = 1;
        } else {
            result = 0;
        }
    }

    private void output() {
        System.out.println(result);
    }
}
