class Main{
  public static void main(String[] args){
    String w=new java.util.Scanner(System.in).next();
    int a=0;
    if(w.equals("SSS")){}
    else if(w.equals("SRR")||w.equals("RRS")){a=2;}
    else if(w.equals("RRR")){a=3;}
    else{a=1;}
    System.out.println(a);
  }
} class Main{
  public static void main(String[] args){
    String w=new java.util.Scanner(System.in).next();
    int a=0;
    if(w.equals("SSS")){}
    else if(w.equals("SRR")||w.equals("RRS")){a=2;}
    else if(w.equals("RRR")){a=3;}
    else{a=1;}
    System.out.println(a);
  }
} Main public static void main(String[] args){
    String w=new java.util.Scanner(System.in).next();
    int a=0;
    if(w.equals("SSS")){}
    else if(w.equals("SRR")||w.equals("RRS")){a=2;}
    else if(w.equals("RRR")){a=3;}
    else{a=1;}
    System.out.println(a);
  } main {
    String w=new java.util.Scanner(System.in).next();
    int a=0;
    if(w.equals("SSS")){}
    else if(w.equals("SRR")||w.equals("RRS")){a=2;}
    else if(w.equals("RRR")){a=3;}
    else{a=1;}
    System.out.println(a);
  } String w=new java.util.Scanner(System.in).next(); w new java.util.Scanner(System.in).next() new java.util.Scanner(System.in).next new java.util.Scanner(System.in) int a=0; a 0 if(w.equals("SSS")){}
    else if(w.equals("SRR")||w.equals("RRS")){a=2;}
    else if(w.equals("RRR")){a=3;}
    else{a=1;} w.equals("SSS") w.equals w "SSS" {} if(w.equals("SRR")||w.equals("RRS")){a=2;}
    else if(w.equals("RRR")){a=3;}
    else{a=1;} w.equals("SRR")||w.equals("RRS") w.equals("SRR") w.equals w "SRR" w.equals("RRS") w.equals w "RRS" {a=2;} a=2 a 2 if(w.equals("RRR")){a=3;}
    else{a=1;} w.equals("RRR") w.equals w "RRR" {a=3;} a=3 a 3 {a=1;} a=1 a 1 System.out.println(a) System.out.println System.out System System.out a String[] args args
class Main{
  public static void main(String[] args){
    String w=new java.util.Scanner(System.in).next();
    int a=0;
    if(w.equals("SSS")){}
    else if(w.equals("SRR")||w.equals("RRS")){a=2;}
    else if(w.equals("RRR")){a=3;}
    else{a=1;}
    System.out.println(a);
  }
}
