import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		int r = 0;
		for(int i=0; i < 3; i++) {
			if(s.charAt(i)=='R') {
				if(i==2&&s.charAt(1)=='S')r=0;
				r++;
			}
		}
		System.out.println(r);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		int r = 0;
		for(int i=0; i < 3; i++) {
			if(s.charAt(i)=='R') {
				if(i==2&&s.charAt(1)=='S')r=0;
				r++;
			}
		}
		System.out.println(r);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		int r = 0;
		for(int i=0; i < 3; i++) {
			if(s.charAt(i)=='R') {
				if(i==2&&s.charAt(1)=='S')r=0;
				r++;
			}
		}
		System.out.println(r);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		int r = 0;
		for(int i=0; i < 3; i++) {
			if(s.charAt(i)=='R') {
				if(i==2&&s.charAt(1)=='S')r=0;
				r++;
			}
		}
		System.out.println(r);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc int r = 0; r 0 for(int i=0; i < 3; i++) {
			if(s.charAt(i)=='R') {
				if(i==2&&s.charAt(1)=='S')r=0;
				r++;
			}
		} int i=0; int i=0; i 0 i < 3 i 3 i++ i++ i {
			if(s.charAt(i)=='R') {
				if(i==2&&s.charAt(1)=='S')r=0;
				r++;
			}
		} {
			if(s.charAt(i)=='R') {
				if(i==2&&s.charAt(1)=='S')r=0;
				r++;
			}
		} if(s.charAt(i)=='R') {
				if(i==2&&s.charAt(1)=='S')r=0;
				r++;
			} s.charAt(i)=='R' s.charAt(i) s.charAt s i 'R' {
				if(i==2&&s.charAt(1)=='S')r=0;
				r++;
			} if(i==2&&s.charAt(1)=='S')r=0; i==2&&s.charAt(1)=='S' i==2 i 2 s.charAt(1)=='S' s.charAt(1) s.charAt s 1 'S' r=0 r 0 r++ r System.out.println(r) System.out.println System.out System System.out r String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		int r = 0;
		for(int i=0; i < 3; i++) {
			if(s.charAt(i)=='R') {
				if(i==2&&s.charAt(1)=='S')r=0;
				r++;
			}
		}
		System.out.println(r);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		int r = 0;
		for(int i=0; i < 3; i++) {
			if(s.charAt(i)=='R') {
				if(i==2&&s.charAt(1)=='S')r=0;
				r++;
			}
		}
		System.out.println(r);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		int r = 0;
		for(int i=0; i < 3; i++) {
			if(s.charAt(i)=='R') {
				if(i==2&&s.charAt(1)=='S')r=0;
				r++;
			}
		}
		System.out.println(r);
	}
}
