import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String reg1 = "RRR";
		String reg2 = "RR";
		String reg3 = "R";
		Pattern p1 = Pattern.compile(reg1);
		Pattern p2 = Pattern.compile(reg2);
		Pattern p3 = Pattern.compile(reg3);
		Matcher m1 = p1.matcher(s);	
		Matcher m2 = p2.matcher(s);	
		Matcher m3 = p3.matcher(s);	

		if(m1.find()) {
			System.out.println("3");
		}else if(m2.find()) {
			System.out.println("2");
		}else if(m3.find()) {
			System.out.println("1");
		}else {
			System.out.println("0");
		}
	}

} import java.util.Scanner; Scanner java.util import java.util.regex.Matcher; Matcher java.util.regex import java.util.regex.Pattern; Pattern java.util.regex public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String reg1 = "RRR";
		String reg2 = "RR";
		String reg3 = "R";
		Pattern p1 = Pattern.compile(reg1);
		Pattern p2 = Pattern.compile(reg2);
		Pattern p3 = Pattern.compile(reg3);
		Matcher m1 = p1.matcher(s);	
		Matcher m2 = p2.matcher(s);	
		Matcher m3 = p3.matcher(s);	

		if(m1.find()) {
			System.out.println("3");
		}else if(m2.find()) {
			System.out.println("2");
		}else if(m3.find()) {
			System.out.println("1");
		}else {
			System.out.println("0");
		}
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String reg1 = "RRR";
		String reg2 = "RR";
		String reg3 = "R";
		Pattern p1 = Pattern.compile(reg1);
		Pattern p2 = Pattern.compile(reg2);
		Pattern p3 = Pattern.compile(reg3);
		Matcher m1 = p1.matcher(s);	
		Matcher m2 = p2.matcher(s);	
		Matcher m3 = p3.matcher(s);	

		if(m1.find()) {
			System.out.println("3");
		}else if(m2.find()) {
			System.out.println("2");
		}else if(m3.find()) {
			System.out.println("1");
		}else {
			System.out.println("0");
		}
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String reg1 = "RRR";
		String reg2 = "RR";
		String reg3 = "R";
		Pattern p1 = Pattern.compile(reg1);
		Pattern p2 = Pattern.compile(reg2);
		Pattern p3 = Pattern.compile(reg3);
		Matcher m1 = p1.matcher(s);	
		Matcher m2 = p2.matcher(s);	
		Matcher m3 = p3.matcher(s);	

		if(m1.find()) {
			System.out.println("3");
		}else if(m2.find()) {
			System.out.println("2");
		}else if(m3.find()) {
			System.out.println("1");
		}else {
			System.out.println("0");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String reg1 = "RRR"; reg1 "RRR" String reg2 = "RR"; reg2 "RR" String reg3 = "R"; reg3 "R" Pattern p1 = Pattern.compile(reg1); p1 Pattern.compile(reg1) Pattern.compile Pattern reg1 Pattern p2 = Pattern.compile(reg2); p2 Pattern.compile(reg2) Pattern.compile Pattern reg2 Pattern p3 = Pattern.compile(reg3); p3 Pattern.compile(reg3) Pattern.compile Pattern reg3 Matcher m1 = p1.matcher(s); m1 p1.matcher(s) p1.matcher p1 s Matcher m2 = p2.matcher(s); m2 p2.matcher(s) p2.matcher p2 s Matcher m3 = p3.matcher(s); m3 p3.matcher(s) p3.matcher p3 s if(m1.find()) {
			System.out.println("3");
		}else if(m2.find()) {
			System.out.println("2");
		}else if(m3.find()) {
			System.out.println("1");
		}else {
			System.out.println("0");
		} m1.find() m1.find m1 {
			System.out.println("3");
		} System.out.println("3") System.out.println System.out System System.out "3" if(m2.find()) {
			System.out.println("2");
		}else if(m3.find()) {
			System.out.println("1");
		}else {
			System.out.println("0");
		} m2.find() m2.find m2 {
			System.out.println("2");
		} System.out.println("2") System.out.println System.out System System.out "2" if(m3.find()) {
			System.out.println("1");
		}else {
			System.out.println("0");
		} m3.find() m3.find m3 {
			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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String reg1 = "RRR";
		String reg2 = "RR";
		String reg3 = "R";
		Pattern p1 = Pattern.compile(reg1);
		Pattern p2 = Pattern.compile(reg2);
		Pattern p3 = Pattern.compile(reg3);
		Matcher m1 = p1.matcher(s);	
		Matcher m2 = p2.matcher(s);	
		Matcher m3 = p3.matcher(s);	

		if(m1.find()) {
			System.out.println("3");
		}else if(m2.find()) {
			System.out.println("2");
		}else if(m3.find()) {
			System.out.println("1");
		}else {
			System.out.println("0");
		}
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String reg1 = "RRR";
		String reg2 = "RR";
		String reg3 = "R";
		Pattern p1 = Pattern.compile(reg1);
		Pattern p2 = Pattern.compile(reg2);
		Pattern p3 = Pattern.compile(reg3);
		Matcher m1 = p1.matcher(s);	
		Matcher m2 = p2.matcher(s);	
		Matcher m3 = p3.matcher(s);	

		if(m1.find()) {
			System.out.println("3");
		}else if(m2.find()) {
			System.out.println("2");
		}else if(m3.find()) {
			System.out.println("1");
		}else {
			System.out.println("0");
		}
	}

} Main
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String reg1 = "RRR";
		String reg2 = "RR";
		String reg3 = "R";
		Pattern p1 = Pattern.compile(reg1);
		Pattern p2 = Pattern.compile(reg2);
		Pattern p3 = Pattern.compile(reg3);
		Matcher m1 = p1.matcher(s);	
		Matcher m2 = p2.matcher(s);	
		Matcher m3 = p3.matcher(s);	

		if(m1.find()) {
			System.out.println("3");
		}else if(m2.find()) {
			System.out.println("2");
		}else if(m3.find()) {
			System.out.println("1");
		}else {
			System.out.println("0");
		}
	}

}