import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			String s = sc.next();
			
			
			boolean isRain = false;
			int duration = 0;
			for(int i = 0 ; i < s.length() ; i++ ) {
				
				if ( s.charAt(i) == 'R') {
					if ( isRain) {
						duration++;
					}
					else {
						duration = 1;
					}
					isRain = true;
				}
				else {
					isRain = false;
				}
								
			}
			
			System.out.println(duration);
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			String s = sc.next();
			
			
			boolean isRain = false;
			int duration = 0;
			for(int i = 0 ; i < s.length() ; i++ ) {
				
				if ( s.charAt(i) == 'R') {
					if ( isRain) {
						duration++;
					}
					else {
						duration = 1;
					}
					isRain = true;
				}
				else {
					isRain = false;
				}
								
			}
			
			System.out.println(duration);
		}
	}

} Main public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			String s = sc.next();
			
			
			boolean isRain = false;
			int duration = 0;
			for(int i = 0 ; i < s.length() ; i++ ) {
				
				if ( s.charAt(i) == 'R') {
					if ( isRain) {
						duration++;
					}
					else {
						duration = 1;
					}
					isRain = true;
				}
				else {
					isRain = false;
				}
								
			}
			
			System.out.println(duration);
		}
	} main {
		try(Scanner sc = new Scanner(System.in)) {
			
			String s = sc.next();
			
			
			boolean isRain = false;
			int duration = 0;
			for(int i = 0 ; i < s.length() ; i++ ) {
				
				if ( s.charAt(i) == 'R') {
					if ( isRain) {
						duration++;
					}
					else {
						duration = 1;
					}
					isRain = true;
				}
				else {
					isRain = false;
				}
								
			}
			
			System.out.println(duration);
		}
	} try(Scanner sc = new Scanner(System.in)) {
			
			String s = sc.next();
			
			
			boolean isRain = false;
			int duration = 0;
			for(int i = 0 ; i < s.length() ; i++ ) {
				
				if ( s.charAt(i) == 'R') {
					if ( isRain) {
						duration++;
					}
					else {
						duration = 1;
					}
					isRain = true;
				}
				else {
					isRain = false;
				}
								
			}
			
			System.out.println(duration);
		} {
			
			String s = sc.next();
			
			
			boolean isRain = false;
			int duration = 0;
			for(int i = 0 ; i < s.length() ; i++ ) {
				
				if ( s.charAt(i) == 'R') {
					if ( isRain) {
						duration++;
					}
					else {
						duration = 1;
					}
					isRain = true;
				}
				else {
					isRain = false;
				}
								
			}
			
			System.out.println(duration);
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc boolean isRain = false; isRain false int duration = 0; duration 0 for(int i = 0 ; i < s.length() ; i++ ) {
				
				if ( s.charAt(i) == 'R') {
					if ( isRain) {
						duration++;
					}
					else {
						duration = 1;
					}
					isRain = true;
				}
				else {
					isRain = false;
				}
								
			} int i = 0 ; int i = 0 ; i 0 i < s.length() i s.length() s.length s i++ i++ i {
				
				if ( s.charAt(i) == 'R') {
					if ( isRain) {
						duration++;
					}
					else {
						duration = 1;
					}
					isRain = true;
				}
				else {
					isRain = false;
				}
								
			} {
				
				if ( s.charAt(i) == 'R') {
					if ( isRain) {
						duration++;
					}
					else {
						duration = 1;
					}
					isRain = true;
				}
				else {
					isRain = false;
				}
								
			} if ( s.charAt(i) == 'R') {
					if ( isRain) {
						duration++;
					}
					else {
						duration = 1;
					}
					isRain = true;
				}
				else {
					isRain = false;
				} s.charAt(i) == 'R' s.charAt(i) s.charAt s i 'R' {
					if ( isRain) {
						duration++;
					}
					else {
						duration = 1;
					}
					isRain = true;
				} if ( isRain) {
						duration++;
					}
					else {
						duration = 1;
					} isRain {
						duration++;
					} duration++ duration {
						duration = 1;
					} duration = 1 duration 1 isRain = true isRain true {
					isRain = false;
				} isRain = false isRain false System.out.println(duration) System.out.println System.out System System.out duration String[] args args public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			String s = sc.next();
			
			
			boolean isRain = false;
			int duration = 0;
			for(int i = 0 ; i < s.length() ; i++ ) {
				
				if ( s.charAt(i) == 'R') {
					if ( isRain) {
						duration++;
					}
					else {
						duration = 1;
					}
					isRain = true;
				}
				else {
					isRain = false;
				}
								
			}
			
			System.out.println(duration);
		}
	}

} public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			String s = sc.next();
			
			
			boolean isRain = false;
			int duration = 0;
			for(int i = 0 ; i < s.length() ; i++ ) {
				
				if ( s.charAt(i) == 'R') {
					if ( isRain) {
						duration++;
					}
					else {
						duration = 1;
					}
					isRain = true;
				}
				else {
					isRain = false;
				}
								
			}
			
			System.out.println(duration);
		}
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			String s = sc.next();
			
			
			boolean isRain = false;
			int duration = 0;
			for(int i = 0 ; i < s.length() ; i++ ) {
				
				if ( s.charAt(i) == 'R') {
					if ( isRain) {
						duration++;
					}
					else {
						duration = 1;
					}
					isRain = true;
				}
				else {
					isRain = false;
				}
								
			}
			
			System.out.println(duration);
		}
	}

}