import java.util.*;
public class Main {
	public static void main(String[] args){
		// 文字列の入力
		Scanner sc = new Scanner(System.in);
        String someString = sc.next();
		char rChar = 'R';
        int rCount = 0;
      
		for (int i = 0; i < someString.length(); i++) {
        if(rCount==0 && someString.charAt(i) == rChar){
          rCount = 1;
        }
        if (someString.charAt(i) == rChar) {
          if(i>0 && someString.charAt(i-1) == rChar){
           rCount++;
          }
        }         
        }
      
      System.out.println(rCount);
      
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		// 文字列の入力
		Scanner sc = new Scanner(System.in);
        String someString = sc.next();
		char rChar = 'R';
        int rCount = 0;
      
		for (int i = 0; i < someString.length(); i++) {
        if(rCount==0 && someString.charAt(i) == rChar){
          rCount = 1;
        }
        if (someString.charAt(i) == rChar) {
          if(i>0 && someString.charAt(i-1) == rChar){
           rCount++;
          }
        }         
        }
      
      System.out.println(rCount);
      
	}
} Main public static void main(String[] args){
		// 文字列の入力
		Scanner sc = new Scanner(System.in);
        String someString = sc.next();
		char rChar = 'R';
        int rCount = 0;
      
		for (int i = 0; i < someString.length(); i++) {
        if(rCount==0 && someString.charAt(i) == rChar){
          rCount = 1;
        }
        if (someString.charAt(i) == rChar) {
          if(i>0 && someString.charAt(i-1) == rChar){
           rCount++;
          }
        }         
        }
      
      System.out.println(rCount);
      
	} main {
		// 文字列の入力
		Scanner sc = new Scanner(System.in);
        String someString = sc.next();
		char rChar = 'R';
        int rCount = 0;
      
		for (int i = 0; i < someString.length(); i++) {
        if(rCount==0 && someString.charAt(i) == rChar){
          rCount = 1;
        }
        if (someString.charAt(i) == rChar) {
          if(i>0 && someString.charAt(i-1) == rChar){
           rCount++;
          }
        }         
        }
      
      System.out.println(rCount);
      
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String someString = sc.next(); someString sc.next() sc.next sc char rChar = 'R'; rChar 'R' int rCount = 0; rCount 0 for (int i = 0; i < someString.length(); i++) {
        if(rCount==0 && someString.charAt(i) == rChar){
          rCount = 1;
        }
        if (someString.charAt(i) == rChar) {
          if(i>0 && someString.charAt(i-1) == rChar){
           rCount++;
          }
        }         
        } int i = 0; int i = 0; i 0 i < someString.length() i someString.length() someString.length someString i++ i++ i {
        if(rCount==0 && someString.charAt(i) == rChar){
          rCount = 1;
        }
        if (someString.charAt(i) == rChar) {
          if(i>0 && someString.charAt(i-1) == rChar){
           rCount++;
          }
        }         
        } {
        if(rCount==0 && someString.charAt(i) == rChar){
          rCount = 1;
        }
        if (someString.charAt(i) == rChar) {
          if(i>0 && someString.charAt(i-1) == rChar){
           rCount++;
          }
        }         
        } if(rCount==0 && someString.charAt(i) == rChar){
          rCount = 1;
        } rCount==0 && someString.charAt(i) == rChar rCount==0 rCount 0 someString.charAt(i) == rChar someString.charAt(i) someString.charAt someString i rChar {
          rCount = 1;
        } rCount = 1 rCount 1 if (someString.charAt(i) == rChar) {
          if(i>0 && someString.charAt(i-1) == rChar){
           rCount++;
          }
        } someString.charAt(i) == rChar someString.charAt(i) someString.charAt someString i rChar {
          if(i>0 && someString.charAt(i-1) == rChar){
           rCount++;
          }
        } if(i>0 && someString.charAt(i-1) == rChar){
           rCount++;
          } i>0 && someString.charAt(i-1) == rChar i>0 i 0 someString.charAt(i-1) == rChar someString.charAt(i-1) someString.charAt someString i-1 i 1 rChar {
           rCount++;
          } rCount++ rCount System.out.println(rCount) System.out.println System.out System System.out rCount String[] args args public class Main {
	public static void main(String[] args){
		// 文字列の入力
		Scanner sc = new Scanner(System.in);
        String someString = sc.next();
		char rChar = 'R';
        int rCount = 0;
      
		for (int i = 0; i < someString.length(); i++) {
        if(rCount==0 && someString.charAt(i) == rChar){
          rCount = 1;
        }
        if (someString.charAt(i) == rChar) {
          if(i>0 && someString.charAt(i-1) == rChar){
           rCount++;
          }
        }         
        }
      
      System.out.println(rCount);
      
	}
} public class Main {
	public static void main(String[] args){
		// 文字列の入力
		Scanner sc = new Scanner(System.in);
        String someString = sc.next();
		char rChar = 'R';
        int rCount = 0;
      
		for (int i = 0; i < someString.length(); i++) {
        if(rCount==0 && someString.charAt(i) == rChar){
          rCount = 1;
        }
        if (someString.charAt(i) == rChar) {
          if(i>0 && someString.charAt(i-1) == rChar){
           rCount++;
          }
        }         
        }
      
      System.out.println(rCount);
      
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		// 文字列の入力
		Scanner sc = new Scanner(System.in);
        String someString = sc.next();
		char rChar = 'R';
        int rCount = 0;
      
		for (int i = 0; i < someString.length(); i++) {
        if(rCount==0 && someString.charAt(i) == rChar){
          rCount = 1;
        }
        if (someString.charAt(i) == rChar) {
          if(i>0 && someString.charAt(i-1) == rChar){
           rCount++;
          }
        }         
        }
      
      System.out.println(rCount);
      
	}
}