import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
    	Scanner sn = new Scanner(System.in);
      String s = sn.next();
      String[] a = s.split("");
      int max = 0;
      int aux = 0;
      for(int i = 0; i < a.length; i++) {
      	if(a[i].equals("R")) {
        	aux++;
          	max = Math.max(max, aux);
        } else {
          	aux = 0;
        }
      }
      System.out.println(max);
    }
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String args[]) {
    	Scanner sn = new Scanner(System.in);
      String s = sn.next();
      String[] a = s.split("");
      int max = 0;
      int aux = 0;
      for(int i = 0; i < a.length; i++) {
      	if(a[i].equals("R")) {
        	aux++;
          	max = Math.max(max, aux);
        } else {
          	aux = 0;
        }
      }
      System.out.println(max);
    }
} Main public static void main(String args[]) {
    	Scanner sn = new Scanner(System.in);
      String s = sn.next();
      String[] a = s.split("");
      int max = 0;
      int aux = 0;
      for(int i = 0; i < a.length; i++) {
      	if(a[i].equals("R")) {
        	aux++;
          	max = Math.max(max, aux);
        } else {
          	aux = 0;
        }
      }
      System.out.println(max);
    } main {
    	Scanner sn = new Scanner(System.in);
      String s = sn.next();
      String[] a = s.split("");
      int max = 0;
      int aux = 0;
      for(int i = 0; i < a.length; i++) {
      	if(a[i].equals("R")) {
        	aux++;
          	max = Math.max(max, aux);
        } else {
          	aux = 0;
        }
      }
      System.out.println(max);
    } Scanner sn = new Scanner(System.in); sn new Scanner(System.in) String s = sn.next(); s sn.next() sn.next sn String[] a = s.split(""); a s.split("") s.split s "" int max = 0; max 0 int aux = 0; aux 0 for(int i = 0; i < a.length; i++) {
      	if(a[i].equals("R")) {
        	aux++;
          	max = Math.max(max, aux);
        } else {
          	aux = 0;
        }
      } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
      	if(a[i].equals("R")) {
        	aux++;
          	max = Math.max(max, aux);
        } else {
          	aux = 0;
        }
      } {
      	if(a[i].equals("R")) {
        	aux++;
          	max = Math.max(max, aux);
        } else {
          	aux = 0;
        }
      } if(a[i].equals("R")) {
        	aux++;
          	max = Math.max(max, aux);
        } else {
          	aux = 0;
        } a[i].equals("R") a[i].equals a[i] a i "R" {
        	aux++;
          	max = Math.max(max, aux);
        } aux++ aux max = Math.max(max, aux) max Math.max(max, aux) Math.max Math max aux {
          	aux = 0;
        } aux = 0 aux 0 System.out.println(max) System.out.println System.out System System.out max String args[] args public class Main {
	public static void main(String args[]) {
    	Scanner sn = new Scanner(System.in);
      String s = sn.next();
      String[] a = s.split("");
      int max = 0;
      int aux = 0;
      for(int i = 0; i < a.length; i++) {
      	if(a[i].equals("R")) {
        	aux++;
          	max = Math.max(max, aux);
        } else {
          	aux = 0;
        }
      }
      System.out.println(max);
    }
} public class Main {
	public static void main(String args[]) {
    	Scanner sn = new Scanner(System.in);
      String s = sn.next();
      String[] a = s.split("");
      int max = 0;
      int aux = 0;
      for(int i = 0; i < a.length; i++) {
      	if(a[i].equals("R")) {
        	aux++;
          	max = Math.max(max, aux);
        } else {
          	aux = 0;
        }
      }
      System.out.println(max);
    }
} Main
import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
    	Scanner sn = new Scanner(System.in);
      String s = sn.next();
      String[] a = s.split("");
      int max = 0;
      int aux = 0;
      for(int i = 0; i < a.length; i++) {
      	if(a[i].equals("R")) {
        	aux++;
          	max = Math.max(max, aux);
        } else {
          	aux = 0;
        }
      }
      System.out.println(max);
    }
}