import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String s=sc.next();
        int count=0;
        int max=Integer.MIN_VALUE;
        if(s.charAt(0)=='R' && s.charAt(1)=='R' && s.charAt(2)=='R')
        count=3;
        else if(s.charAt(0)=='R' && s.charAt(1)=='R')
        count=2;
        else if(s.charAt(1)=='R' && s.charAt(2)=='R')
        count=2;
        else if(s.charAt(0)!='R' && s.charAt(1)!='R' && s.charAt(2)!='R')
        count=0;
        else
        count=1;
        System.out.println(count);
    }    
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String s=sc.next();
        int count=0;
        int max=Integer.MIN_VALUE;
        if(s.charAt(0)=='R' && s.charAt(1)=='R' && s.charAt(2)=='R')
        count=3;
        else if(s.charAt(0)=='R' && s.charAt(1)=='R')
        count=2;
        else if(s.charAt(1)=='R' && s.charAt(2)=='R')
        count=2;
        else if(s.charAt(0)!='R' && s.charAt(1)!='R' && s.charAt(2)!='R')
        count=0;
        else
        count=1;
        System.out.println(count);
    }    
} Main public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String s=sc.next();
        int count=0;
        int max=Integer.MIN_VALUE;
        if(s.charAt(0)=='R' && s.charAt(1)=='R' && s.charAt(2)=='R')
        count=3;
        else if(s.charAt(0)=='R' && s.charAt(1)=='R')
        count=2;
        else if(s.charAt(1)=='R' && s.charAt(2)=='R')
        count=2;
        else if(s.charAt(0)!='R' && s.charAt(1)!='R' && s.charAt(2)!='R')
        count=0;
        else
        count=1;
        System.out.println(count);
    } main {
        Scanner sc=new Scanner(System.in);
        String s=sc.next();
        int count=0;
        int max=Integer.MIN_VALUE;
        if(s.charAt(0)=='R' && s.charAt(1)=='R' && s.charAt(2)=='R')
        count=3;
        else if(s.charAt(0)=='R' && s.charAt(1)=='R')
        count=2;
        else if(s.charAt(1)=='R' && s.charAt(2)=='R')
        count=2;
        else if(s.charAt(0)!='R' && s.charAt(1)!='R' && s.charAt(2)!='R')
        count=0;
        else
        count=1;
        System.out.println(count);
    } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String s=sc.next(); s sc.next() sc.next sc int count=0; count 0 int max=Integer.MIN_VALUE; max Integer.MIN_VALUE Integer Integer.MIN_VALUE if(s.charAt(0)=='R' && s.charAt(1)=='R' && s.charAt(2)=='R')
        count=3;
        else if(s.charAt(0)=='R' && s.charAt(1)=='R')
        count=2;
        else if(s.charAt(1)=='R' && s.charAt(2)=='R')
        count=2;
        else if(s.charAt(0)!='R' && s.charAt(1)!='R' && s.charAt(2)!='R')
        count=0;
        else
        count=1; s.charAt(0)=='R' && s.charAt(1)=='R' && s.charAt(2)=='R' s.charAt(0)=='R' && s.charAt(1)=='R' && s.charAt(2)=='R' s.charAt(0)=='R' s.charAt(0) s.charAt s 0 'R' s.charAt(1)=='R' s.charAt(1) s.charAt s 1 'R' s.charAt(2)=='R' s.charAt(2) s.charAt s 2 'R' count=3 count 3 if(s.charAt(0)=='R' && s.charAt(1)=='R')
        count=2;
        else if(s.charAt(1)=='R' && s.charAt(2)=='R')
        count=2;
        else if(s.charAt(0)!='R' && s.charAt(1)!='R' && s.charAt(2)!='R')
        count=0;
        else
        count=1; s.charAt(0)=='R' && s.charAt(1)=='R' s.charAt(0)=='R' s.charAt(0) s.charAt s 0 'R' s.charAt(1)=='R' s.charAt(1) s.charAt s 1 'R' count=2 count 2 if(s.charAt(1)=='R' && s.charAt(2)=='R')
        count=2;
        else if(s.charAt(0)!='R' && s.charAt(1)!='R' && s.charAt(2)!='R')
        count=0;
        else
        count=1; s.charAt(1)=='R' && s.charAt(2)=='R' s.charAt(1)=='R' s.charAt(1) s.charAt s 1 'R' s.charAt(2)=='R' s.charAt(2) s.charAt s 2 'R' count=2 count 2 if(s.charAt(0)!='R' && s.charAt(1)!='R' && s.charAt(2)!='R')
        count=0;
        else
        count=1; s.charAt(0)!='R' && s.charAt(1)!='R' && s.charAt(2)!='R' s.charAt(0)!='R' && s.charAt(1)!='R' && s.charAt(2)!='R' s.charAt(0)!='R' s.charAt(0) s.charAt s 0 'R' s.charAt(1)!='R' s.charAt(1) s.charAt s 1 'R' s.charAt(2)!='R' s.charAt(2) s.charAt s 2 'R' count=0 count 0 count=1 count 1 System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String s=sc.next();
        int count=0;
        int max=Integer.MIN_VALUE;
        if(s.charAt(0)=='R' && s.charAt(1)=='R' && s.charAt(2)=='R')
        count=3;
        else if(s.charAt(0)=='R' && s.charAt(1)=='R')
        count=2;
        else if(s.charAt(1)=='R' && s.charAt(2)=='R')
        count=2;
        else if(s.charAt(0)!='R' && s.charAt(1)!='R' && s.charAt(2)!='R')
        count=0;
        else
        count=1;
        System.out.println(count);
    }    
}