import java.util.*;
public class Main {
	public static void main(String... args) {
    	Scanner input = new Scanner(System.in);
        
        String str = input.next();
        
        int ans = 0;
        if (str.contains("RRR")) {
        	ans = 3;
        } else if (str.contains("RR")) {
        	ans = 2;
        } else if (str.contains("R")) {
        	ans = 1;
		}
        
        System.out.println(ans);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String... args) {
    	Scanner input = new Scanner(System.in);
        
        String str = input.next();
        
        int ans = 0;
        if (str.contains("RRR")) {
        	ans = 3;
        } else if (str.contains("RR")) {
        	ans = 2;
        } else if (str.contains("R")) {
        	ans = 1;
		}
        
        System.out.println(ans);
	}
} Main public static void main(String... args) {
    	Scanner input = new Scanner(System.in);
        
        String str = input.next();
        
        int ans = 0;
        if (str.contains("RRR")) {
        	ans = 3;
        } else if (str.contains("RR")) {
        	ans = 2;
        } else if (str.contains("R")) {
        	ans = 1;
		}
        
        System.out.println(ans);
	} main {
    	Scanner input = new Scanner(System.in);
        
        String str = input.next();
        
        int ans = 0;
        if (str.contains("RRR")) {
        	ans = 3;
        } else if (str.contains("RR")) {
        	ans = 2;
        } else if (str.contains("R")) {
        	ans = 1;
		}
        
        System.out.println(ans);
	} Scanner input = new Scanner(System.in); input new Scanner(System.in) String str = input.next(); str input.next() input.next input int ans = 0; ans 0 if (str.contains("RRR")) {
        	ans = 3;
        } else if (str.contains("RR")) {
        	ans = 2;
        } else if (str.contains("R")) {
        	ans = 1;
		} str.contains("RRR") str.contains str "RRR" {
        	ans = 3;
        } ans = 3 ans 3 if (str.contains("RR")) {
        	ans = 2;
        } else if (str.contains("R")) {
        	ans = 1;
		} str.contains("RR") str.contains str "RR" {
        	ans = 2;
        } ans = 2 ans 2 if (str.contains("R")) {
        	ans = 1;
		} str.contains("R") str.contains str "R" {
        	ans = 1;
		} ans = 1 ans 1 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 input = new Scanner(System.in);
        
        String str = input.next();
        
        int ans = 0;
        if (str.contains("RRR")) {
        	ans = 3;
        } else if (str.contains("RR")) {
        	ans = 2;
        } else if (str.contains("R")) {
        	ans = 1;
		}
        
        System.out.println(ans);
	}
} public class Main {
	public static void main(String... args) {
    	Scanner input = new Scanner(System.in);
        
        String str = input.next();
        
        int ans = 0;
        if (str.contains("RRR")) {
        	ans = 3;
        } else if (str.contains("RR")) {
        	ans = 2;
        } else if (str.contains("R")) {
        	ans = 1;
		}
        
        System.out.println(ans);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String... args) {
    	Scanner input = new Scanner(System.in);
        
        String str = input.next();
        
        int ans = 0;
        if (str.contains("RRR")) {
        	ans = 3;
        } else if (str.contains("RR")) {
        	ans = 2;
        } else if (str.contains("R")) {
        	ans = 1;
		}
        
        System.out.println(ans);
	}
}