import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main{
    static final Scanner sc = new Scanner(System.in);
    public static void main(final String[] args){
        final Pattern p = Pattern.compile("R+");
        final Matcher m = p.matcher(sc.next());
        if (m.find()){
            System.out.println(m.group().length());
        }else{
            System.out.println(0);
        }
    }
} import java.util.*; util.* java import java.util.regex.Matcher; Matcher java.util.regex import java.util.regex.Pattern; Pattern java.util.regex public class Main{
    static final Scanner sc = new Scanner(System.in);
    public static void main(final String[] args){
        final Pattern p = Pattern.compile("R+");
        final Matcher m = p.matcher(sc.next());
        if (m.find()){
            System.out.println(m.group().length());
        }else{
            System.out.println(0);
        }
    }
} Main static final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(final String[] args){
        final Pattern p = Pattern.compile("R+");
        final Matcher m = p.matcher(sc.next());
        if (m.find()){
            System.out.println(m.group().length());
        }else{
            System.out.println(0);
        }
    } main {
        final Pattern p = Pattern.compile("R+");
        final Matcher m = p.matcher(sc.next());
        if (m.find()){
            System.out.println(m.group().length());
        }else{
            System.out.println(0);
        }
    } final Pattern p = Pattern.compile("R+"); p Pattern.compile("R+") Pattern.compile Pattern "R+" final Matcher m = p.matcher(sc.next()); m p.matcher(sc.next()) p.matcher p sc.next() sc.next sc if (m.find()){
            System.out.println(m.group().length());
        }else{
            System.out.println(0);
        } m.find() m.find m {
            System.out.println(m.group().length());
        } System.out.println(m.group().length()) System.out.println System.out System System.out m.group().length() m.group().length m.group() m.group m {
            System.out.println(0);
        } System.out.println(0) System.out.println System.out System System.out 0 final String[] args args public class Main{
    static final Scanner sc = new Scanner(System.in);
    public static void main(final String[] args){
        final Pattern p = Pattern.compile("R+");
        final Matcher m = p.matcher(sc.next());
        if (m.find()){
            System.out.println(m.group().length());
        }else{
            System.out.println(0);
        }
    }
} public class Main{
    static final Scanner sc = new Scanner(System.in);
    public static void main(final String[] args){
        final Pattern p = Pattern.compile("R+");
        final Matcher m = p.matcher(sc.next());
        if (m.find()){
            System.out.println(m.group().length());
        }else{
            System.out.println(0);
        }
    }
} Main
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main{
    static final Scanner sc = new Scanner(System.in);
    public static void main(final String[] args){
        final Pattern p = Pattern.compile("R+");
        final Matcher m = p.matcher(sc.next());
        if (m.find()){
            System.out.println(m.group().length());
        }else{
            System.out.println(0);
        }
    }
}
