import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String a = sc.next();
      	int s = 0;
		switch (a){
			case "SSS":
				s = 0;
				break;
			case "SRR":
				s = 2;
				break;
          case "RRS":
            	s = 2;
            break;
          	case "RRR":
            	s = 3;
            break;
			default:
				s = 1;
		}
      System.out.println(s);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String a = sc.next();
      	int s = 0;
		switch (a){
			case "SSS":
				s = 0;
				break;
			case "SRR":
				s = 2;
				break;
          case "RRS":
            	s = 2;
            break;
          	case "RRR":
            	s = 3;
            break;
			default:
				s = 1;
		}
      System.out.println(s);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String a = sc.next();
      	int s = 0;
		switch (a){
			case "SSS":
				s = 0;
				break;
			case "SRR":
				s = 2;
				break;
          case "RRS":
            	s = 2;
            break;
          	case "RRR":
            	s = 3;
            break;
			default:
				s = 1;
		}
      System.out.println(s);
	} main {
		Scanner sc = new Scanner(System.in);
		
		String a = sc.next();
      	int s = 0;
		switch (a){
			case "SSS":
				s = 0;
				break;
			case "SRR":
				s = 2;
				break;
          case "RRS":
            	s = 2;
            break;
          	case "RRR":
            	s = 3;
            break;
			default:
				s = 1;
		}
      System.out.println(s);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc int s = 0; s 0 switch (a){
			case "SSS":
				s = 0;
				break;
			case "SRR":
				s = 2;
				break;
          case "RRS":
            	s = 2;
            break;
          	case "RRR":
            	s = 3;
            break;
			default:
				s = 1;
		} a case "SSS": "SSS" case "SSS": s = 0 s 0 break; case "SRR": "SRR" case "SRR": s = 2 s 2 break; case "RRS": "RRS" case "RRS": s = 2 s 2 break; case "RRR": "RRR" case "RRR": s = 3 s 3 break; default: default: s = 1 s 1 System.out.println(s) System.out.println System.out System System.out s String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String a = sc.next();
      	int s = 0;
		switch (a){
			case "SSS":
				s = 0;
				break;
			case "SRR":
				s = 2;
				break;
          case "RRS":
            	s = 2;
            break;
          	case "RRR":
            	s = 3;
            break;
			default:
				s = 1;
		}
      System.out.println(s);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String a = sc.next();
      	int s = 0;
		switch (a){
			case "SSS":
				s = 0;
				break;
			case "SRR":
				s = 2;
				break;
          case "RRS":
            	s = 2;
            break;
          	case "RRR":
            	s = 3;
            break;
			default:
				s = 1;
		}
      System.out.println(s);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String a = sc.next();
      	int s = 0;
		switch (a){
			case "SSS":
				s = 0;
				break;
			case "SRR":
				s = 2;
				break;
          case "RRS":
            	s = 2;
            break;
          	case "RRR":
            	s = 3;
            break;
			default:
				s = 1;
		}
      System.out.println(s);
	}
}