import java.util.Scanner;
import java.lang.Math;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int totalRainy = getConcRainy(str);
		System.out.println(totalRainy);
	}


	public static int getConcRainy(String str){
		int total = 0;
		int max = 0;
		if(str.charAt(0) == 'R'){
			total++;
			max = Math.max(max, total);
		}

		for(int i = 1; i < str.length(); i++){
			if(str.charAt(i - 1) == str.charAt(i) && 
				       str.charAt(i) == 'R'){
			  total++;
			  max = Math.max(total, max);
			} else if(str.charAt(i) == 'R'){
				total = 1;
				max = Math.max(total, max);
			} else {
				total = 0;
			}
		}

		return max;
	}
} import java.util.Scanner; Scanner java.util import java.lang.Math; Math java.lang public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int totalRainy = getConcRainy(str);
		System.out.println(totalRainy);
	}


	public static int getConcRainy(String str){
		int total = 0;
		int max = 0;
		if(str.charAt(0) == 'R'){
			total++;
			max = Math.max(max, total);
		}

		for(int i = 1; i < str.length(); i++){
			if(str.charAt(i - 1) == str.charAt(i) && 
				       str.charAt(i) == 'R'){
			  total++;
			  max = Math.max(total, max);
			} else if(str.charAt(i) == 'R'){
				total = 1;
				max = Math.max(total, max);
			} else {
				total = 0;
			}
		}

		return max;
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int totalRainy = getConcRainy(str);
		System.out.println(totalRainy);
	} main {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int totalRainy = getConcRainy(str);
		System.out.println(totalRainy);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan int totalRainy = getConcRainy(str); totalRainy getConcRainy(str) getConcRainy str System.out.println(totalRainy) System.out.println System.out System System.out totalRainy String[] args args public static int getConcRainy(String str){
		int total = 0;
		int max = 0;
		if(str.charAt(0) == 'R'){
			total++;
			max = Math.max(max, total);
		}

		for(int i = 1; i < str.length(); i++){
			if(str.charAt(i - 1) == str.charAt(i) && 
				       str.charAt(i) == 'R'){
			  total++;
			  max = Math.max(total, max);
			} else if(str.charAt(i) == 'R'){
				total = 1;
				max = Math.max(total, max);
			} else {
				total = 0;
			}
		}

		return max;
	} getConcRainy {
		int total = 0;
		int max = 0;
		if(str.charAt(0) == 'R'){
			total++;
			max = Math.max(max, total);
		}

		for(int i = 1; i < str.length(); i++){
			if(str.charAt(i - 1) == str.charAt(i) && 
				       str.charAt(i) == 'R'){
			  total++;
			  max = Math.max(total, max);
			} else if(str.charAt(i) == 'R'){
				total = 1;
				max = Math.max(total, max);
			} else {
				total = 0;
			}
		}

		return max;
	} int total = 0; total 0 int max = 0; max 0 if(str.charAt(0) == 'R'){
			total++;
			max = Math.max(max, total);
		} str.charAt(0) == 'R' str.charAt(0) str.charAt str 0 'R' {
			total++;
			max = Math.max(max, total);
		} total++ total max = Math.max(max, total) max Math.max(max, total) Math.max Math max total for(int i = 1; i < str.length(); i++){
			if(str.charAt(i - 1) == str.charAt(i) && 
				       str.charAt(i) == 'R'){
			  total++;
			  max = Math.max(total, max);
			} else if(str.charAt(i) == 'R'){
				total = 1;
				max = Math.max(total, max);
			} else {
				total = 0;
			}
		} int i = 1; int i = 1; i 1 i < str.length() i str.length() str.length str i++ i++ i {
			if(str.charAt(i - 1) == str.charAt(i) && 
				       str.charAt(i) == 'R'){
			  total++;
			  max = Math.max(total, max);
			} else if(str.charAt(i) == 'R'){
				total = 1;
				max = Math.max(total, max);
			} else {
				total = 0;
			}
		} {
			if(str.charAt(i - 1) == str.charAt(i) && 
				       str.charAt(i) == 'R'){
			  total++;
			  max = Math.max(total, max);
			} else if(str.charAt(i) == 'R'){
				total = 1;
				max = Math.max(total, max);
			} else {
				total = 0;
			}
		} if(str.charAt(i - 1) == str.charAt(i) && 
				       str.charAt(i) == 'R'){
			  total++;
			  max = Math.max(total, max);
			} else if(str.charAt(i) == 'R'){
				total = 1;
				max = Math.max(total, max);
			} else {
				total = 0;
			} str.charAt(i - 1) == str.charAt(i) && 
				       str.charAt(i) == 'R' str.charAt(i - 1) == str.charAt(i) str.charAt(i - 1) str.charAt str i - 1 i 1 str.charAt(i) str.charAt str i str.charAt(i) == 'R' str.charAt(i) str.charAt str i 'R' {
			  total++;
			  max = Math.max(total, max);
			} total++ total max = Math.max(total, max) max Math.max(total, max) Math.max Math total max if(str.charAt(i) == 'R'){
				total = 1;
				max = Math.max(total, max);
			} else {
				total = 0;
			} str.charAt(i) == 'R' str.charAt(i) str.charAt str i 'R' {
				total = 1;
				max = Math.max(total, max);
			} total = 1 total 1 max = Math.max(total, max) max Math.max(total, max) Math.max Math total max {
				total = 0;
			} total = 0 total 0 return max; max String str str public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int totalRainy = getConcRainy(str);
		System.out.println(totalRainy);
	}


	public static int getConcRainy(String str){
		int total = 0;
		int max = 0;
		if(str.charAt(0) == 'R'){
			total++;
			max = Math.max(max, total);
		}

		for(int i = 1; i < str.length(); i++){
			if(str.charAt(i - 1) == str.charAt(i) && 
				       str.charAt(i) == 'R'){
			  total++;
			  max = Math.max(total, max);
			} else if(str.charAt(i) == 'R'){
				total = 1;
				max = Math.max(total, max);
			} else {
				total = 0;
			}
		}

		return max;
	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int totalRainy = getConcRainy(str);
		System.out.println(totalRainy);
	}


	public static int getConcRainy(String str){
		int total = 0;
		int max = 0;
		if(str.charAt(0) == 'R'){
			total++;
			max = Math.max(max, total);
		}

		for(int i = 1; i < str.length(); i++){
			if(str.charAt(i - 1) == str.charAt(i) && 
				       str.charAt(i) == 'R'){
			  total++;
			  max = Math.max(total, max);
			} else if(str.charAt(i) == 'R'){
				total = 1;
				max = Math.max(total, max);
			} else {
				total = 0;
			}
		}

		return max;
	}
} Main
import java.util.Scanner;
import java.lang.Math;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int totalRainy = getConcRainy(str);
		System.out.println(totalRainy);
	}


	public static int getConcRainy(String str){
		int total = 0;
		int max = 0;
		if(str.charAt(0) == 'R'){
			total++;
			max = Math.max(max, total);
		}

		for(int i = 1; i < str.length(); i++){
			if(str.charAt(i - 1) == str.charAt(i) && 
				       str.charAt(i) == 'R'){
			  total++;
			  max = Math.max(total, max);
			} else if(str.charAt(i) == 'R'){
				total = 1;
				max = Math.max(total, max);
			} else {
				total = 0;
			}
		}

		return max;
	}
}
