import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {
        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            String str = br.readLine();
            
            int result = 0;
            int kariResult = 0;
            for(int i=0; i<str.length(); i++){
                if(str.charAt(i) == 'R'){
                    kariResult++;
                    result = kariResult;
                }else{
                    kariResult = 0;
                }
            }
            
            System.out.println(result);
        }catch(Exception e){
            System.out.println(e);
        }
    }
} import java.io.*; io.* java public class Main {
    public static void main(String[] args) throws Exception {
        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            String str = br.readLine();
            
            int result = 0;
            int kariResult = 0;
            for(int i=0; i<str.length(); i++){
                if(str.charAt(i) == 'R'){
                    kariResult++;
                    result = kariResult;
                }else{
                    kariResult = 0;
                }
            }
            
            System.out.println(result);
        }catch(Exception e){
            System.out.println(e);
        }
    }
} Main public static void main(String[] args) throws Exception {
        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            String str = br.readLine();
            
            int result = 0;
            int kariResult = 0;
            for(int i=0; i<str.length(); i++){
                if(str.charAt(i) == 'R'){
                    kariResult++;
                    result = kariResult;
                }else{
                    kariResult = 0;
                }
            }
            
            System.out.println(result);
        }catch(Exception e){
            System.out.println(e);
        }
    } main {
        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            String str = br.readLine();
            
            int result = 0;
            int kariResult = 0;
            for(int i=0; i<str.length(); i++){
                if(str.charAt(i) == 'R'){
                    kariResult++;
                    result = kariResult;
                }else{
                    kariResult = 0;
                }
            }
            
            System.out.println(result);
        }catch(Exception e){
            System.out.println(e);
        }
    } try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            String str = br.readLine();
            
            int result = 0;
            int kariResult = 0;
            for(int i=0; i<str.length(); i++){
                if(str.charAt(i) == 'R'){
                    kariResult++;
                    result = kariResult;
                }else{
                    kariResult = 0;
                }
            }
            
            System.out.println(result);
        }catch(Exception e){
            System.out.println(e);
        } catch(Exception e){
            System.out.println(e);
        } Exception e {
            System.out.println(e);
        } System.out.println(e) System.out.println System.out System System.out e {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            String str = br.readLine();
            
            int result = 0;
            int kariResult = 0;
            for(int i=0; i<str.length(); i++){
                if(str.charAt(i) == 'R'){
                    kariResult++;
                    result = kariResult;
                }else{
                    kariResult = 0;
                }
            }
            
            System.out.println(result);
        } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str = br.readLine(); str br.readLine() br.readLine br int result = 0; result 0 int kariResult = 0; kariResult 0 for(int i=0; i<str.length(); i++){
                if(str.charAt(i) == 'R'){
                    kariResult++;
                    result = kariResult;
                }else{
                    kariResult = 0;
                }
            } int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
                if(str.charAt(i) == 'R'){
                    kariResult++;
                    result = kariResult;
                }else{
                    kariResult = 0;
                }
            } {
                if(str.charAt(i) == 'R'){
                    kariResult++;
                    result = kariResult;
                }else{
                    kariResult = 0;
                }
            } if(str.charAt(i) == 'R'){
                    kariResult++;
                    result = kariResult;
                }else{
                    kariResult = 0;
                } str.charAt(i) == 'R' str.charAt(i) str.charAt str i 'R' {
                    kariResult++;
                    result = kariResult;
                } kariResult++ kariResult result = kariResult result kariResult {
                    kariResult = 0;
                } kariResult = 0 kariResult 0 System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            String str = br.readLine();
            
            int result = 0;
            int kariResult = 0;
            for(int i=0; i<str.length(); i++){
                if(str.charAt(i) == 'R'){
                    kariResult++;
                    result = kariResult;
                }else{
                    kariResult = 0;
                }
            }
            
            System.out.println(result);
        }catch(Exception e){
            System.out.println(e);
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            String str = br.readLine();
            
            int result = 0;
            int kariResult = 0;
            for(int i=0; i<str.length(); i++){
                if(str.charAt(i) == 'R'){
                    kariResult++;
                    result = kariResult;
                }else{
                    kariResult = 0;
                }
            }
            
            System.out.println(result);
        }catch(Exception e){
            System.out.println(e);
        }
    }
} Main
import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {
        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            String str = br.readLine();
            
            int result = 0;
            int kariResult = 0;
            for(int i=0; i<str.length(); i++){
                if(str.charAt(i) == 'R'){
                    kariResult++;
                    result = kariResult;
                }else{
                    kariResult = 0;
                }
            }
            
            System.out.println(result);
        }catch(Exception e){
            System.out.println(e);
        }
    }
}