
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.Vector;

public class Main {

	public static void main(String[] args) {
		Scanner ob=new Scanner(System.in);
		String s=ob.next();
		int a[]=new int[s.length()];
		int k=0;
		for (int i=0; i<s.length(); i++) {
			if (s.charAt(i)=='R') {
				a[k]++;
			}
			else {
				k++;
			}
		}
	                   Vector  v=new Vector ();
		for(int i=0;i<a.length;i++){v.add(a[i]);}
		System.out.println(Collections.max(v));
	}
} import java.util.Arrays; Arrays java.util import java.util.Collection; Collection java.util import java.util.Collections; Collections java.util import java.util.HashMap; HashMap java.util import java.util.HashSet; HashSet java.util import java.util.Iterator; Iterator java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util import java.util.Vector; Vector java.util public class Main {

	public static void main(String[] args) {
		Scanner ob=new Scanner(System.in);
		String s=ob.next();
		int a[]=new int[s.length()];
		int k=0;
		for (int i=0; i<s.length(); i++) {
			if (s.charAt(i)=='R') {
				a[k]++;
			}
			else {
				k++;
			}
		}
	                   Vector  v=new Vector ();
		for(int i=0;i<a.length;i++){v.add(a[i]);}
		System.out.println(Collections.max(v));
	}
} Main public static void main(String[] args) {
		Scanner ob=new Scanner(System.in);
		String s=ob.next();
		int a[]=new int[s.length()];
		int k=0;
		for (int i=0; i<s.length(); i++) {
			if (s.charAt(i)=='R') {
				a[k]++;
			}
			else {
				k++;
			}
		}
	                   Vector  v=new Vector ();
		for(int i=0;i<a.length;i++){v.add(a[i]);}
		System.out.println(Collections.max(v));
	} main {
		Scanner ob=new Scanner(System.in);
		String s=ob.next();
		int a[]=new int[s.length()];
		int k=0;
		for (int i=0; i<s.length(); i++) {
			if (s.charAt(i)=='R') {
				a[k]++;
			}
			else {
				k++;
			}
		}
	                   Vector  v=new Vector ();
		for(int i=0;i<a.length;i++){v.add(a[i]);}
		System.out.println(Collections.max(v));
	} Scanner ob=new Scanner(System.in); ob new Scanner(System.in) String s=ob.next(); s ob.next() ob.next ob int a[]=new int[s.length()]; a new int[s.length()] s.length() s.length s int k=0; k 0 for (int i=0; i<s.length(); i++) {
			if (s.charAt(i)=='R') {
				a[k]++;
			}
			else {
				k++;
			}
		} int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
			if (s.charAt(i)=='R') {
				a[k]++;
			}
			else {
				k++;
			}
		} {
			if (s.charAt(i)=='R') {
				a[k]++;
			}
			else {
				k++;
			}
		} if (s.charAt(i)=='R') {
				a[k]++;
			}
			else {
				k++;
			} s.charAt(i)=='R' s.charAt(i) s.charAt s i 'R' {
				a[k]++;
			} a[k]++ a[k] a k {
				k++;
			} k++ k Vector  v=new Vector (); v new Vector () for(int i=0;i<a.length;i++){v.add(a[i]);} int i=0; int i=0; i 0 i<a.length i a.length a a.length i++ i++ i {v.add(a[i]);} {v.add(a[i]);} v.add(a[i]) v.add v a[i] a i System.out.println(Collections.max(v)) System.out.println System.out System System.out Collections.max(v) Collections.max Collections v String[] args args public class Main {

	public static void main(String[] args) {
		Scanner ob=new Scanner(System.in);
		String s=ob.next();
		int a[]=new int[s.length()];
		int k=0;
		for (int i=0; i<s.length(); i++) {
			if (s.charAt(i)=='R') {
				a[k]++;
			}
			else {
				k++;
			}
		}
	                   Vector  v=new Vector ();
		for(int i=0;i<a.length;i++){v.add(a[i]);}
		System.out.println(Collections.max(v));
	}
} public class Main {

	public static void main(String[] args) {
		Scanner ob=new Scanner(System.in);
		String s=ob.next();
		int a[]=new int[s.length()];
		int k=0;
		for (int i=0; i<s.length(); i++) {
			if (s.charAt(i)=='R') {
				a[k]++;
			}
			else {
				k++;
			}
		}
	                   Vector  v=new Vector ();
		for(int i=0;i<a.length;i++){v.add(a[i]);}
		System.out.println(Collections.max(v));
	}
} Main

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.Vector;

public class Main {

	public static void main(String[] args) {
		Scanner ob=new Scanner(System.in);
		String s=ob.next();
		int a[]=new int[s.length()];
		int k=0;
		for (int i=0; i<s.length(); i++) {
			if (s.charAt(i)=='R') {
				a[k]++;
			}
			else {
				k++;
			}
		}
	                   Vector  v=new Vector ();
		for(int i=0;i<a.length;i++){v.add(a[i]);}
		System.out.println(Collections.max(v));
	}
}
