import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String args[]) throws IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	char charArray[] = br.readLine().toCharArray();
	if (charArray[0] == 'R' && charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(3);
	} else if (charArray[0] == 'R' && charArray[1] == 'R' || charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(2);
	} else if (charArray[0] == 'R' || charArray[1] == 'R' || charArray[2] == 'R') {
	    System.out.println(1);
	} else {
	    System.out.println(0);
	}
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String args[]) throws IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	char charArray[] = br.readLine().toCharArray();
	if (charArray[0] == 'R' && charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(3);
	} else if (charArray[0] == 'R' && charArray[1] == 'R' || charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(2);
	} else if (charArray[0] == 'R' || charArray[1] == 'R' || charArray[2] == 'R') {
	    System.out.println(1);
	} else {
	    System.out.println(0);
	}
    }
} Main public static void main(String args[]) throws IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	char charArray[] = br.readLine().toCharArray();
	if (charArray[0] == 'R' && charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(3);
	} else if (charArray[0] == 'R' && charArray[1] == 'R' || charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(2);
	} else if (charArray[0] == 'R' || charArray[1] == 'R' || charArray[2] == 'R') {
	    System.out.println(1);
	} else {
	    System.out.println(0);
	}
    } main {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	char charArray[] = br.readLine().toCharArray();
	if (charArray[0] == 'R' && charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(3);
	} else if (charArray[0] == 'R' && charArray[1] == 'R' || charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(2);
	} else if (charArray[0] == 'R' || charArray[1] == 'R' || charArray[2] == 'R') {
	    System.out.println(1);
	} else {
	    System.out.println(0);
	}
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) char charArray[] = br.readLine().toCharArray(); charArray br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br if (charArray[0] == 'R' && charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(3);
	} else if (charArray[0] == 'R' && charArray[1] == 'R' || charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(2);
	} else if (charArray[0] == 'R' || charArray[1] == 'R' || charArray[2] == 'R') {
	    System.out.println(1);
	} else {
	    System.out.println(0);
	} charArray[0] == 'R' && charArray[1] == 'R' && charArray[2] == 'R' charArray[0] == 'R' && charArray[1] == 'R' && charArray[2] == 'R' charArray[0] == 'R' charArray[0] charArray 0 'R' charArray[1] == 'R' charArray[1] charArray 1 'R' charArray[2] == 'R' charArray[2] charArray 2 'R' {
	    System.out.println(3);
	} System.out.println(3) System.out.println System.out System System.out 3 if (charArray[0] == 'R' && charArray[1] == 'R' || charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(2);
	} else if (charArray[0] == 'R' || charArray[1] == 'R' || charArray[2] == 'R') {
	    System.out.println(1);
	} else {
	    System.out.println(0);
	} charArray[0] == 'R' && charArray[1] == 'R' || charArray[1] == 'R' && charArray[2] == 'R' charArray[0] == 'R' && charArray[1] == 'R' charArray[0] == 'R' charArray[0] charArray 0 'R' charArray[1] == 'R' charArray[1] charArray 1 'R' charArray[1] == 'R' && charArray[2] == 'R' charArray[1] == 'R' charArray[1] charArray 1 'R' charArray[2] == 'R' charArray[2] charArray 2 'R' {
	    System.out.println(2);
	} System.out.println(2) System.out.println System.out System System.out 2 if (charArray[0] == 'R' || charArray[1] == 'R' || charArray[2] == 'R') {
	    System.out.println(1);
	} else {
	    System.out.println(0);
	} charArray[0] == 'R' || charArray[1] == 'R' || charArray[2] == 'R' charArray[0] == 'R' || charArray[1] == 'R' || charArray[2] == 'R' charArray[0] == 'R' charArray[0] charArray 0 'R' charArray[1] == 'R' charArray[1] charArray 1 'R' charArray[2] == 'R' charArray[2] charArray 2 'R' {
	    System.out.println(1);
	} System.out.println(1) System.out.println System.out System System.out 1 {
	    System.out.println(0);
	} System.out.println(0) System.out.println System.out System System.out 0 String args[] args public class Main {
    public static void main(String args[]) throws IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	char charArray[] = br.readLine().toCharArray();
	if (charArray[0] == 'R' && charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(3);
	} else if (charArray[0] == 'R' && charArray[1] == 'R' || charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(2);
	} else if (charArray[0] == 'R' || charArray[1] == 'R' || charArray[2] == 'R') {
	    System.out.println(1);
	} else {
	    System.out.println(0);
	}
    }
} public class Main {
    public static void main(String args[]) throws IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	char charArray[] = br.readLine().toCharArray();
	if (charArray[0] == 'R' && charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(3);
	} else if (charArray[0] == 'R' && charArray[1] == 'R' || charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(2);
	} else if (charArray[0] == 'R' || charArray[1] == 'R' || charArray[2] == 'R') {
	    System.out.println(1);
	} else {
	    System.out.println(0);
	}
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String args[]) throws IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	char charArray[] = br.readLine().toCharArray();
	if (charArray[0] == 'R' && charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(3);
	} else if (charArray[0] == 'R' && charArray[1] == 'R' || charArray[1] == 'R' && charArray[2] == 'R') {
	    System.out.println(2);
	} else if (charArray[0] == 'R' || charArray[1] == 'R' || charArray[2] == 'R') {
	    System.out.println(1);
	} else {
	    System.out.println(0);
	}
    }
}