import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		char[] n    = scanner.nextLine().toCharArray();
		int ans = 0;
		int cnt = 0;

		for(char x : n) {

			if(x == 'R') {
				cnt++;
				ans = Math.max(ans, cnt);
			}else {
				cnt = 0;
			}
		}

		System.out.println(ans);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.Comparator; Comparator java.util import java.util.HashMap; HashMap java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.Map.Entry; Entry java.util.Map import java.util.PriorityQueue; PriorityQueue java.util import java.util.Queue; Queue java.util import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		char[] n    = scanner.nextLine().toCharArray();
		int ans = 0;
		int cnt = 0;

		for(char x : n) {

			if(x == 'R') {
				cnt++;
				ans = Math.max(ans, cnt);
			}else {
				cnt = 0;
			}
		}

		System.out.println(ans);
	}
} Main public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		char[] n    = scanner.nextLine().toCharArray();
		int ans = 0;
		int cnt = 0;

		for(char x : n) {

			if(x == 'R') {
				cnt++;
				ans = Math.max(ans, cnt);
			}else {
				cnt = 0;
			}
		}

		System.out.println(ans);
	} main {

		Scanner scanner = new Scanner(System.in);
		char[] n    = scanner.nextLine().toCharArray();
		int ans = 0;
		int cnt = 0;

		for(char x : n) {

			if(x == 'R') {
				cnt++;
				ans = Math.max(ans, cnt);
			}else {
				cnt = 0;
			}
		}

		System.out.println(ans);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) char[] n    = scanner.nextLine().toCharArray(); n scanner.nextLine().toCharArray() scanner.nextLine().toCharArray scanner.nextLine() scanner.nextLine scanner int ans = 0; ans 0 int cnt = 0; cnt 0 for(char x : n) {

			if(x == 'R') {
				cnt++;
				ans = Math.max(ans, cnt);
			}else {
				cnt = 0;
			}
		} char x n {

			if(x == 'R') {
				cnt++;
				ans = Math.max(ans, cnt);
			}else {
				cnt = 0;
			}
		} {

			if(x == 'R') {
				cnt++;
				ans = Math.max(ans, cnt);
			}else {
				cnt = 0;
			}
		} if(x == 'R') {
				cnt++;
				ans = Math.max(ans, cnt);
			}else {
				cnt = 0;
			} x == 'R' x 'R' {
				cnt++;
				ans = Math.max(ans, cnt);
			} cnt++ cnt ans = Math.max(ans, cnt) ans Math.max(ans, cnt) Math.max Math ans cnt {
				cnt = 0;
			} cnt = 0 cnt 0 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		char[] n    = scanner.nextLine().toCharArray();
		int ans = 0;
		int cnt = 0;

		for(char x : n) {

			if(x == 'R') {
				cnt++;
				ans = Math.max(ans, cnt);
			}else {
				cnt = 0;
			}
		}

		System.out.println(ans);
	}
} public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		char[] n    = scanner.nextLine().toCharArray();
		int ans = 0;
		int cnt = 0;

		for(char x : n) {

			if(x == 'R') {
				cnt++;
				ans = Math.max(ans, cnt);
			}else {
				cnt = 0;
			}
		}

		System.out.println(ans);
	}
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		char[] n    = scanner.nextLine().toCharArray();
		int ans = 0;
		int cnt = 0;

		for(char x : n) {

			if(x == 'R') {
				cnt++;
				ans = Math.max(ans, cnt);
			}else {
				cnt = 0;
			}
		}

		System.out.println(ans);
	}
}