//  ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿>
//  ⣿         
//  ⣿ Author - midu_01C
//  ⣿         
//  ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿>

import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

public class Main
{
    static Scanner cin = new Scanner(System.in);
    static PrintStream cout = new PrintStream
    (new FileOutputStream(FileDescriptor.out));
    
    public static void main(String args[])
    {
        int t,n,m,a,b,c,d,e,i,j,k,x,y,z,cnt=0;
        boolean flag = false; Vector v = new Vector();
        
        String s;
        s=cin.next();
        char[] ch=s.toCharArray();
        x=0;
        cnt=0;
        for(char c1:ch)
        {
            if(c1=='R') cnt++;
            else cnt=0;
            x=Math.max(x,cnt);
        }
        cout.println(x);
    }
} import java.io.*; io.* java import java.util.*; util.* java import java.math.*; math.* java import java.lang.*; lang.* java public class Main
{
    static Scanner cin = new Scanner(System.in);
    static PrintStream cout = new PrintStream
    (new FileOutputStream(FileDescriptor.out));
    
    public static void main(String args[])
    {
        int t,n,m,a,b,c,d,e,i,j,k,x,y,z,cnt=0;
        boolean flag = false; Vector v = new Vector();
        
        String s;
        s=cin.next();
        char[] ch=s.toCharArray();
        x=0;
        cnt=0;
        for(char c1:ch)
        {
            if(c1=='R') cnt++;
            else cnt=0;
            x=Math.max(x,cnt);
        }
        cout.println(x);
    }
} Main static Scanner cin = new Scanner(System.in); cin new Scanner(System.in) static PrintStream cout = new PrintStream
    (new FileOutputStream(FileDescriptor.out)); cout new PrintStream
    (new FileOutputStream(FileDescriptor.out)) public static void main(String args[])
    {
        int t,n,m,a,b,c,d,e,i,j,k,x,y,z,cnt=0;
        boolean flag = false; Vector v = new Vector();
        
        String s;
        s=cin.next();
        char[] ch=s.toCharArray();
        x=0;
        cnt=0;
        for(char c1:ch)
        {
            if(c1=='R') cnt++;
            else cnt=0;
            x=Math.max(x,cnt);
        }
        cout.println(x);
    } main {
        int t,n,m,a,b,c,d,e,i,j,k,x,y,z,cnt=0;
        boolean flag = false; Vector v = new Vector();
        
        String s;
        s=cin.next();
        char[] ch=s.toCharArray();
        x=0;
        cnt=0;
        for(char c1:ch)
        {
            if(c1=='R') cnt++;
            else cnt=0;
            x=Math.max(x,cnt);
        }
        cout.println(x);
    } int t t n n m m a a b b c c d d e e i i j j k k x x y y z z cnt=0; cnt 0 boolean flag = false; flag false Vector v = new Vector(); v new Vector() String s; s s=cin.next() s cin.next() cin.next cin char[] ch=s.toCharArray(); ch s.toCharArray() s.toCharArray s x=0 x 0 cnt=0 cnt 0 for(char c1:ch)
        {
            if(c1=='R') cnt++;
            else cnt=0;
            x=Math.max(x,cnt);
        } char c1 ch {
            if(c1=='R') cnt++;
            else cnt=0;
            x=Math.max(x,cnt);
        } {
            if(c1=='R') cnt++;
            else cnt=0;
            x=Math.max(x,cnt);
        } if(c1=='R') cnt++;
            else cnt=0; c1=='R' c1 'R' cnt++ cnt cnt=0 cnt 0 x=Math.max(x,cnt) x Math.max(x,cnt) Math.max Math x cnt cout.println(x) cout.println cout x String args[] args public class Main
{
    static Scanner cin = new Scanner(System.in);
    static PrintStream cout = new PrintStream
    (new FileOutputStream(FileDescriptor.out));
    
    public static void main(String args[])
    {
        int t,n,m,a,b,c,d,e,i,j,k,x,y,z,cnt=0;
        boolean flag = false; Vector v = new Vector();
        
        String s;
        s=cin.next();
        char[] ch=s.toCharArray();
        x=0;
        cnt=0;
        for(char c1:ch)
        {
            if(c1=='R') cnt++;
            else cnt=0;
            x=Math.max(x,cnt);
        }
        cout.println(x);
    }
} public class Main
{
    static Scanner cin = new Scanner(System.in);
    static PrintStream cout = new PrintStream
    (new FileOutputStream(FileDescriptor.out));
    
    public static void main(String args[])
    {
        int t,n,m,a,b,c,d,e,i,j,k,x,y,z,cnt=0;
        boolean flag = false; Vector v = new Vector();
        
        String s;
        s=cin.next();
        char[] ch=s.toCharArray();
        x=0;
        cnt=0;
        for(char c1:ch)
        {
            if(c1=='R') cnt++;
            else cnt=0;
            x=Math.max(x,cnt);
        }
        cout.println(x);
    }
} Main
//  ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿>
//  ⣿         
//  ⣿ Author - midu_01C
//  ⣿         
//  ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿>

import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

public class Main
{
    static Scanner cin = new Scanner(System.in);
    static PrintStream cout = new PrintStream
    (new FileOutputStream(FileDescriptor.out));
    
    public static void main(String args[])
    {
        int t,n,m,a,b,c,d,e,i,j,k,x,y,z,cnt=0;
        boolean flag = false; Vector v = new Vector();
        
        String s;
        s=cin.next();
        char[] ch=s.toCharArray();
        x=0;
        cnt=0;
        for(char c1:ch)
        {
            if(c1=='R') cnt++;
            else cnt=0;
            x=Math.max(x,cnt);
        }
        cout.println(x);
    }
}
