import java.util.Scanner;
public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    char[]ss = S.toCharArray();
    
    int cou = 0;
    for(int i=0; i<3; i++) {
    	if(ss[i] == 'R') {
    		cou++;
    	}
    }
    if(cou != 2) {
    	System.out.println(cou);
    }else {
    	if(ss[1] != 'R') {
    		System.out.println(1);
    	}else {
    		System.out.println(cou);
    	}
    }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    char[]ss = S.toCharArray();
    
    int cou = 0;
    for(int i=0; i<3; i++) {
    	if(ss[i] == 'R') {
    		cou++;
    	}
    }
    if(cou != 2) {
    	System.out.println(cou);
    }else {
    	if(ss[1] != 'R') {
    		System.out.println(1);
    	}else {
    		System.out.println(cou);
    	}
    }
    }
} Main public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    char[]ss = S.toCharArray();
    
    int cou = 0;
    for(int i=0; i<3; i++) {
    	if(ss[i] == 'R') {
    		cou++;
    	}
    }
    if(cou != 2) {
    	System.out.println(cou);
    }else {
    	if(ss[1] != 'R') {
    		System.out.println(1);
    	}else {
    		System.out.println(cou);
    	}
    }
    } main {
    
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    char[]ss = S.toCharArray();
    
    int cou = 0;
    for(int i=0; i<3; i++) {
    	if(ss[i] == 'R') {
    		cou++;
    	}
    }
    if(cou != 2) {
    	System.out.println(cou);
    }else {
    	if(ss[1] != 'R') {
    		System.out.println(1);
    	}else {
    		System.out.println(cou);
    	}
    }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc char[]ss = S.toCharArray(); ss S.toCharArray() S.toCharArray S int cou = 0; cou 0 for(int i=0; i<3; i++) {
    	if(ss[i] == 'R') {
    		cou++;
    	}
    } int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
    	if(ss[i] == 'R') {
    		cou++;
    	}
    } {
    	if(ss[i] == 'R') {
    		cou++;
    	}
    } if(ss[i] == 'R') {
    		cou++;
    	} ss[i] == 'R' ss[i] ss i 'R' {
    		cou++;
    	} cou++ cou if(cou != 2) {
    	System.out.println(cou);
    }else {
    	if(ss[1] != 'R') {
    		System.out.println(1);
    	}else {
    		System.out.println(cou);
    	}
    } cou != 2 cou 2 {
    	System.out.println(cou);
    } System.out.println(cou) System.out.println System.out System System.out cou {
    	if(ss[1] != 'R') {
    		System.out.println(1);
    	}else {
    		System.out.println(cou);
    	}
    } if(ss[1] != 'R') {
    		System.out.println(1);
    	}else {
    		System.out.println(cou);
    	} ss[1] != 'R' ss[1] ss 1 'R' {
    		System.out.println(1);
    	} System.out.println(1) System.out.println System.out System System.out 1 {
    		System.out.println(cou);
    	} System.out.println(cou) System.out.println System.out System System.out cou String[] args args public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    char[]ss = S.toCharArray();
    
    int cou = 0;
    for(int i=0; i<3; i++) {
    	if(ss[i] == 'R') {
    		cou++;
    	}
    }
    if(cou != 2) {
    	System.out.println(cou);
    }else {
    	if(ss[1] != 'R') {
    		System.out.println(1);
    	}else {
    		System.out.println(cou);
    	}
    }
    }
} public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    char[]ss = S.toCharArray();
    
    int cou = 0;
    for(int i=0; i<3; i++) {
    	if(ss[i] == 'R') {
    		cou++;
    	}
    }
    if(cou != 2) {
    	System.out.println(cou);
    }else {
    	if(ss[1] != 'R') {
    		System.out.println(1);
    	}else {
    		System.out.println(cou);
    	}
    }
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    char[]ss = S.toCharArray();
    
    int cou = 0;
    for(int i=0; i<3; i++) {
    	if(ss[i] == 'R') {
    		cou++;
    	}
    }
    if(cou != 2) {
    	System.out.println(cou);
    }else {
    	if(ss[1] != 'R') {
    		System.out.println(1);
    	}else {
    		System.out.println(cou);
    	}
    }
    }
}
