import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    String S;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.S = sc.next();
    }
    
    //解答処理
    private int solve() {
        int answer = 0;
        int count = 0;
        
        for (int i=0; i<S.length()-1; i++) {
        	if (S.charAt(i)=='R' || S.charAt(2)=='R') {
        		answer = 1;
        	}
        	if (S.charAt(i)=='R'&&S.charAt(i+1)=='R') {
        		count++;
        	}
        }
        
        if (count==1) {
        	answer = 2;
        }else if (count==2){
        	answer = 3;
        }
        return answer;
    }
    
    //出力
    public void show(int answer) {
        System.out.println(answer);
    }

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    String S;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.S = sc.next();
    }
    
    //解答処理
    private int solve() {
        int answer = 0;
        int count = 0;
        
        for (int i=0; i<S.length()-1; i++) {
        	if (S.charAt(i)=='R' || S.charAt(2)=='R') {
        		answer = 1;
        	}
        	if (S.charAt(i)=='R'&&S.charAt(i+1)=='R') {
        		count++;
        	}
        }
        
        if (count==1) {
        	answer = 2;
        }else if (count==2){
        	answer = 3;
        }
        return answer;
    }
    
    //出力
    public void show(int answer) {
        System.out.println(answer);
    }

} Main //フィールド
    Scanner sc; sc String S; S public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Main m = new Main(sc); m new Main(sc) m.show(m.solve()) m.show m m.solve() m.solve m sc.close() sc.close sc String[] args args //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.S = sc.next();
    } Main {
        this.sc = sc;
        this.S = sc.next();
    } this.sc = sc this.sc this this.sc sc this.S = sc.next() this.S this this.S sc.next() sc.next sc Scanner sc sc //解答処理
    private int solve() {
        int answer = 0;
        int count = 0;
        
        for (int i=0; i<S.length()-1; i++) {
        	if (S.charAt(i)=='R' || S.charAt(2)=='R') {
        		answer = 1;
        	}
        	if (S.charAt(i)=='R'&&S.charAt(i+1)=='R') {
        		count++;
        	}
        }
        
        if (count==1) {
        	answer = 2;
        }else if (count==2){
        	answer = 3;
        }
        return answer;
    } solve {
        int answer = 0;
        int count = 0;
        
        for (int i=0; i<S.length()-1; i++) {
        	if (S.charAt(i)=='R' || S.charAt(2)=='R') {
        		answer = 1;
        	}
        	if (S.charAt(i)=='R'&&S.charAt(i+1)=='R') {
        		count++;
        	}
        }
        
        if (count==1) {
        	answer = 2;
        }else if (count==2){
        	answer = 3;
        }
        return answer;
    } int answer = 0; answer 0 int count = 0; count 0 for (int i=0; i<S.length()-1; i++) {
        	if (S.charAt(i)=='R' || S.charAt(2)=='R') {
        		answer = 1;
        	}
        	if (S.charAt(i)=='R'&&S.charAt(i+1)=='R') {
        		count++;
        	}
        } int i=0; int i=0; i 0 i<S.length()-1 i S.length()-1 S.length() S.length S 1 i++ i++ i {
        	if (S.charAt(i)=='R' || S.charAt(2)=='R') {
        		answer = 1;
        	}
        	if (S.charAt(i)=='R'&&S.charAt(i+1)=='R') {
        		count++;
        	}
        } {
        	if (S.charAt(i)=='R' || S.charAt(2)=='R') {
        		answer = 1;
        	}
        	if (S.charAt(i)=='R'&&S.charAt(i+1)=='R') {
        		count++;
        	}
        } if (S.charAt(i)=='R' || S.charAt(2)=='R') {
        		answer = 1;
        	} S.charAt(i)=='R' || S.charAt(2)=='R' S.charAt(i)=='R' S.charAt(i) S.charAt S i 'R' S.charAt(2)=='R' S.charAt(2) S.charAt S 2 'R' {
        		answer = 1;
        	} answer = 1 answer 1 if (S.charAt(i)=='R'&&S.charAt(i+1)=='R') {
        		count++;
        	} S.charAt(i)=='R'&&S.charAt(i+1)=='R' S.charAt(i)=='R' S.charAt(i) S.charAt S i 'R' S.charAt(i+1)=='R' S.charAt(i+1) S.charAt S i+1 i 1 'R' {
        		count++;
        	} count++ count if (count==1) {
        	answer = 2;
        }else if (count==2){
        	answer = 3;
        } count==1 count 1 {
        	answer = 2;
        } answer = 2 answer 2 if (count==2){
        	answer = 3;
        } count==2 count 2 {
        	answer = 3;
        } answer = 3 answer 3 return answer; answer //出力
    public void show(int answer) {
        System.out.println(answer);
    } show {
        System.out.println(answer);
    } System.out.println(answer) System.out.println System.out System System.out answer int answer answer public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    String S;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.S = sc.next();
    }
    
    //解答処理
    private int solve() {
        int answer = 0;
        int count = 0;
        
        for (int i=0; i<S.length()-1; i++) {
        	if (S.charAt(i)=='R' || S.charAt(2)=='R') {
        		answer = 1;
        	}
        	if (S.charAt(i)=='R'&&S.charAt(i+1)=='R') {
        		count++;
        	}
        }
        
        if (count==1) {
        	answer = 2;
        }else if (count==2){
        	answer = 3;
        }
        return answer;
    }
    
    //出力
    public void show(int answer) {
        System.out.println(answer);
    }

} public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    String S;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.S = sc.next();
    }
    
    //解答処理
    private int solve() {
        int answer = 0;
        int count = 0;
        
        for (int i=0; i<S.length()-1; i++) {
        	if (S.charAt(i)=='R' || S.charAt(2)=='R') {
        		answer = 1;
        	}
        	if (S.charAt(i)=='R'&&S.charAt(i+1)=='R') {
        		count++;
        	}
        }
        
        if (count==1) {
        	answer = 2;
        }else if (count==2){
        	answer = 3;
        }
        return answer;
    }
    
    //出力
    public void show(int answer) {
        System.out.println(answer);
    }

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    String S;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.S = sc.next();
    }
    
    //解答処理
    private int solve() {
        int answer = 0;
        int count = 0;
        
        for (int i=0; i<S.length()-1; i++) {
        	if (S.charAt(i)=='R' || S.charAt(2)=='R') {
        		answer = 1;
        	}
        	if (S.charAt(i)=='R'&&S.charAt(i+1)=='R') {
        		count++;
        	}
        }
        
        if (count==1) {
        	answer = 2;
        }else if (count==2){
        	answer = 3;
        }
        return answer;
    }
    
    //出力
    public void show(int answer) {
        System.out.println(answer);
    }

}
