import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String S = scan.next();

		int total = 0;

		String S1 = S.substring(0,1);
		String S2 = S.substring(1,2);
		String S3 = S.substring(2,3);

		int count = 0;
		while(count < 1)
		{
			if((S1 + S2 + S3).equals("RRR"))
			{
				total += 3;
				break;
			}

			if((S1 + S2).equals("RR") || (S2 + S3).equals("RR"))
			{
				total += 2;
				break;
			}

			if(S1.equals("R") || S2.equals("R") || S3.equals("R"))
			{
				total += 1;
				break;
			}
			count++;
		}

		System.out.println(total);

		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String S = scan.next();

		int total = 0;

		String S1 = S.substring(0,1);
		String S2 = S.substring(1,2);
		String S3 = S.substring(2,3);

		int count = 0;
		while(count < 1)
		{
			if((S1 + S2 + S3).equals("RRR"))
			{
				total += 3;
				break;
			}

			if((S1 + S2).equals("RR") || (S2 + S3).equals("RR"))
			{
				total += 2;
				break;
			}

			if(S1.equals("R") || S2.equals("R") || S3.equals("R"))
			{
				total += 1;
				break;
			}
			count++;
		}

		System.out.println(total);

		scan.close();
	}
} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String S = scan.next();

		int total = 0;

		String S1 = S.substring(0,1);
		String S2 = S.substring(1,2);
		String S3 = S.substring(2,3);

		int count = 0;
		while(count < 1)
		{
			if((S1 + S2 + S3).equals("RRR"))
			{
				total += 3;
				break;
			}

			if((S1 + S2).equals("RR") || (S2 + S3).equals("RR"))
			{
				total += 2;
				break;
			}

			if(S1.equals("R") || S2.equals("R") || S3.equals("R"))
			{
				total += 1;
				break;
			}
			count++;
		}

		System.out.println(total);

		scan.close();
	} main {

		Scanner scan = new Scanner(System.in);

		String S = scan.next();

		int total = 0;

		String S1 = S.substring(0,1);
		String S2 = S.substring(1,2);
		String S3 = S.substring(2,3);

		int count = 0;
		while(count < 1)
		{
			if((S1 + S2 + S3).equals("RRR"))
			{
				total += 3;
				break;
			}

			if((S1 + S2).equals("RR") || (S2 + S3).equals("RR"))
			{
				total += 2;
				break;
			}

			if(S1.equals("R") || S2.equals("R") || S3.equals("R"))
			{
				total += 1;
				break;
			}
			count++;
		}

		System.out.println(total);

		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String S = scan.next(); S scan.next() scan.next scan int total = 0; total 0 String S1 = S.substring(0,1); S1 S.substring(0,1) S.substring S 0 1 String S2 = S.substring(1,2); S2 S.substring(1,2) S.substring S 1 2 String S3 = S.substring(2,3); S3 S.substring(2,3) S.substring S 2 3 int count = 0; count 0 while(count < 1)
		{
			if((S1 + S2 + S3).equals("RRR"))
			{
				total += 3;
				break;
			}

			if((S1 + S2).equals("RR") || (S2 + S3).equals("RR"))
			{
				total += 2;
				break;
			}

			if(S1.equals("R") || S2.equals("R") || S3.equals("R"))
			{
				total += 1;
				break;
			}
			count++;
		} count < 1 count 1 {
			if((S1 + S2 + S3).equals("RRR"))
			{
				total += 3;
				break;
			}

			if((S1 + S2).equals("RR") || (S2 + S3).equals("RR"))
			{
				total += 2;
				break;
			}

			if(S1.equals("R") || S2.equals("R") || S3.equals("R"))
			{
				total += 1;
				break;
			}
			count++;
		} if((S1 + S2 + S3).equals("RRR"))
			{
				total += 3;
				break;
			} (S1 + S2 + S3).equals("RRR") (S1 + S2 + S3).equals (S1 + S2 + S3) S1 + S2 + S3 S1 S2 S3 "RRR" {
				total += 3;
				break;
			} total += 3 total 3 break; if((S1 + S2).equals("RR") || (S2 + S3).equals("RR"))
			{
				total += 2;
				break;
			} (S1 + S2).equals("RR") || (S2 + S3).equals("RR") (S1 + S2).equals("RR") (S1 + S2).equals (S1 + S2) S1 S2 "RR" (S2 + S3).equals("RR") (S2 + S3).equals (S2 + S3) S2 S3 "RR" {
				total += 2;
				break;
			} total += 2 total 2 break; if(S1.equals("R") || S2.equals("R") || S3.equals("R"))
			{
				total += 1;
				break;
			} S1.equals("R") || S2.equals("R") || S3.equals("R") S1.equals("R") || S2.equals("R") || S3.equals("R") S1.equals("R") S1.equals S1 "R" S2.equals("R") S2.equals S2 "R" S3.equals("R") S3.equals S3 "R" {
				total += 1;
				break;
			} total += 1 total 1 break; count++ count System.out.println(total) System.out.println System.out System System.out total scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String S = scan.next();

		int total = 0;

		String S1 = S.substring(0,1);
		String S2 = S.substring(1,2);
		String S3 = S.substring(2,3);

		int count = 0;
		while(count < 1)
		{
			if((S1 + S2 + S3).equals("RRR"))
			{
				total += 3;
				break;
			}

			if((S1 + S2).equals("RR") || (S2 + S3).equals("RR"))
			{
				total += 2;
				break;
			}

			if(S1.equals("R") || S2.equals("R") || S3.equals("R"))
			{
				total += 1;
				break;
			}
			count++;
		}

		System.out.println(total);

		scan.close();
	}
} public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String S = scan.next();

		int total = 0;

		String S1 = S.substring(0,1);
		String S2 = S.substring(1,2);
		String S3 = S.substring(2,3);

		int count = 0;
		while(count < 1)
		{
			if((S1 + S2 + S3).equals("RRR"))
			{
				total += 3;
				break;
			}

			if((S1 + S2).equals("RR") || (S2 + S3).equals("RR"))
			{
				total += 2;
				break;
			}

			if(S1.equals("R") || S2.equals("R") || S3.equals("R"))
			{
				total += 1;
				break;
			}
			count++;
		}

		System.out.println(total);

		scan.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String S = scan.next();

		int total = 0;

		String S1 = S.substring(0,1);
		String S2 = S.substring(1,2);
		String S3 = S.substring(2,3);

		int count = 0;
		while(count < 1)
		{
			if((S1 + S2 + S3).equals("RRR"))
			{
				total += 3;
				break;
			}

			if((S1 + S2).equals("RR") || (S2 + S3).equals("RR"))
			{
				total += 2;
				break;
			}

			if(S1.equals("R") || S2.equals("R") || S3.equals("R"))
			{
				total += 1;
				break;
			}
			count++;
		}

		System.out.println(total);

		scan.close();
	}
}
