// "static void main" must be defined in a public class.
import java.util.* ;
public class Main {
    public static void main(String[] args) {
        Scanner S = new Scanner( System.in ) ;
        String s = S.nextLine() ;
        int result = 0 ; int count = 0 ;
        for( char ch : s.toCharArray() ) {
            if( ch=='R' ) {
                count++ ;
            }else count = 0 ;
            result = Math.max( result , count ) ;
        }
        System.out.println(result) ;
    }
} import java.util.* ; util.* java public class Main {
    public static void main(String[] args) {
        Scanner S = new Scanner( System.in ) ;
        String s = S.nextLine() ;
        int result = 0 ; int count = 0 ;
        for( char ch : s.toCharArray() ) {
            if( ch=='R' ) {
                count++ ;
            }else count = 0 ;
            result = Math.max( result , count ) ;
        }
        System.out.println(result) ;
    }
} Main public static void main(String[] args) {
        Scanner S = new Scanner( System.in ) ;
        String s = S.nextLine() ;
        int result = 0 ; int count = 0 ;
        for( char ch : s.toCharArray() ) {
            if( ch=='R' ) {
                count++ ;
            }else count = 0 ;
            result = Math.max( result , count ) ;
        }
        System.out.println(result) ;
    } main {
        Scanner S = new Scanner( System.in ) ;
        String s = S.nextLine() ;
        int result = 0 ; int count = 0 ;
        for( char ch : s.toCharArray() ) {
            if( ch=='R' ) {
                count++ ;
            }else count = 0 ;
            result = Math.max( result , count ) ;
        }
        System.out.println(result) ;
    } Scanner S = new Scanner( System.in ) ; S new Scanner( System.in ) String s = S.nextLine() ; s S.nextLine() S.nextLine S int result = 0 ; result 0 int count = 0 ; count 0 for( char ch : s.toCharArray() ) {
            if( ch=='R' ) {
                count++ ;
            }else count = 0 ;
            result = Math.max( result , count ) ;
        } char ch s.toCharArray() s.toCharArray s {
            if( ch=='R' ) {
                count++ ;
            }else count = 0 ;
            result = Math.max( result , count ) ;
        } {
            if( ch=='R' ) {
                count++ ;
            }else count = 0 ;
            result = Math.max( result , count ) ;
        } if( ch=='R' ) {
                count++ ;
            }else count = 0 ; ch=='R' ch 'R' {
                count++ ;
            } count++ count count = 0 count 0 result = Math.max( result , count ) result Math.max( result , count ) Math.max Math result count 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) {
        Scanner S = new Scanner( System.in ) ;
        String s = S.nextLine() ;
        int result = 0 ; int count = 0 ;
        for( char ch : s.toCharArray() ) {
            if( ch=='R' ) {
                count++ ;
            }else count = 0 ;
            result = Math.max( result , count ) ;
        }
        System.out.println(result) ;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner S = new Scanner( System.in ) ;
        String s = S.nextLine() ;
        int result = 0 ; int count = 0 ;
        for( char ch : s.toCharArray() ) {
            if( ch=='R' ) {
                count++ ;
            }else count = 0 ;
            result = Math.max( result , count ) ;
        }
        System.out.println(result) ;
    }
} Main
// "static void main" must be defined in a public class.
import java.util.* ;
public class Main {
    public static void main(String[] args) {
        Scanner S = new Scanner( System.in ) ;
        String s = S.nextLine() ;
        int result = 0 ; int count = 0 ;
        for( char ch : s.toCharArray() ) {
            if( ch=='R' ) {
                count++ ;
            }else count = 0 ;
            result = Math.max( result , count ) ;
        }
        System.out.println(result) ;
    }
}