//  ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿>
//  ⣿         
//  ⣿ 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);
    }
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz