import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        String str = sn.next();
        int cnt = 0;
        for ( int i = 0; i < 3; i++){
            String c = str.substring(i,i+1);
            if (c.equals("R")){
                cnt = cnt + 1;
            }
        }
        if ( str.equals("RSR")) {
                cnt = 1;
        }
        System.out.println(cnt);
    }
} import java.util.List; List java.util import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        String str = sn.next();
        int cnt = 0;
        for ( int i = 0; i < 3; i++){
            String c = str.substring(i,i+1);
            if (c.equals("R")){
                cnt = cnt + 1;
            }
        }
        if ( str.equals("RSR")) {
                cnt = 1;
        }
        System.out.println(cnt);
    }
} Main public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        String str = sn.next();
        int cnt = 0;
        for ( int i = 0; i < 3; i++){
            String c = str.substring(i,i+1);
            if (c.equals("R")){
                cnt = cnt + 1;
            }
        }
        if ( str.equals("RSR")) {
                cnt = 1;
        }
        System.out.println(cnt);
    } main {
        Scanner sn = new Scanner(System.in);
        String str = sn.next();
        int cnt = 0;
        for ( int i = 0; i < 3; i++){
            String c = str.substring(i,i+1);
            if (c.equals("R")){
                cnt = cnt + 1;
            }
        }
        if ( str.equals("RSR")) {
                cnt = 1;
        }
        System.out.println(cnt);
    } Scanner sn = new Scanner(System.in); sn new Scanner(System.in) String str = sn.next(); str sn.next() sn.next sn int cnt = 0; cnt 0 for ( int i = 0; i < 3; i++){
            String c = str.substring(i,i+1);
            if (c.equals("R")){
                cnt = cnt + 1;
            }
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            String c = str.substring(i,i+1);
            if (c.equals("R")){
                cnt = cnt + 1;
            }
        } {
            String c = str.substring(i,i+1);
            if (c.equals("R")){
                cnt = cnt + 1;
            }
        } String c = str.substring(i,i+1); c str.substring(i,i+1) str.substring str i i+1 i 1 if (c.equals("R")){
                cnt = cnt + 1;
            } c.equals("R") c.equals c "R" {
                cnt = cnt + 1;
            } cnt = cnt + 1 cnt cnt + 1 cnt 1 if ( str.equals("RSR")) {
                cnt = 1;
        } str.equals("RSR") str.equals str "RSR" {
                cnt = 1;
        } cnt = 1 cnt 1 System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
	public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        String str = sn.next();
        int cnt = 0;
        for ( int i = 0; i < 3; i++){
            String c = str.substring(i,i+1);
            if (c.equals("R")){
                cnt = cnt + 1;
            }
        }
        if ( str.equals("RSR")) {
                cnt = 1;
        }
        System.out.println(cnt);
    }
} public class Main {
	public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        String str = sn.next();
        int cnt = 0;
        for ( int i = 0; i < 3; i++){
            String c = str.substring(i,i+1);
            if (c.equals("R")){
                cnt = cnt + 1;
            }
        }
        if ( str.equals("RSR")) {
                cnt = 1;
        }
        System.out.println(cnt);
    }
} Main
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        String str = sn.next();
        int cnt = 0;
        for ( int i = 0; i < 3; i++){
            String c = str.substring(i,i+1);
            if (c.equals("R")){
                cnt = cnt + 1;
            }
        }
        if ( str.equals("RSR")) {
                cnt = 1;
        }
        System.out.println(cnt);
    }
}
