import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		String str = reader.next();
		int maxR = 0, currR = 0;
		for (int i = 0; i < str.length(); i++) {
			char curr = str.charAt(i);
			if (curr == 'S') {
				currR = 0;
			}
			else {
				currR++;
				maxR = Math.max(maxR, currR);
			}
		}
		System.out.println(maxR);
		
		reader.close();
	}
	
} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		String str = reader.next();
		int maxR = 0, currR = 0;
		for (int i = 0; i < str.length(); i++) {
			char curr = str.charAt(i);
			if (curr == 'S') {
				currR = 0;
			}
			else {
				currR++;
				maxR = Math.max(maxR, currR);
			}
		}
		System.out.println(maxR);
		
		reader.close();
	}
	
} Main public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		String str = reader.next();
		int maxR = 0, currR = 0;
		for (int i = 0; i < str.length(); i++) {
			char curr = str.charAt(i);
			if (curr == 'S') {
				currR = 0;
			}
			else {
				currR++;
				maxR = Math.max(maxR, currR);
			}
		}
		System.out.println(maxR);
		
		reader.close();
	} main {
		Scanner reader = new Scanner(System.in);
		String str = reader.next();
		int maxR = 0, currR = 0;
		for (int i = 0; i < str.length(); i++) {
			char curr = str.charAt(i);
			if (curr == 'S') {
				currR = 0;
			}
			else {
				currR++;
				maxR = Math.max(maxR, currR);
			}
		}
		System.out.println(maxR);
		
		reader.close();
	} Scanner reader = new Scanner(System.in); reader new Scanner(System.in) String str = reader.next(); str reader.next() reader.next reader int maxR = 0 maxR 0 currR = 0; currR 0 for (int i = 0; i < str.length(); i++) {
			char curr = str.charAt(i);
			if (curr == 'S') {
				currR = 0;
			}
			else {
				currR++;
				maxR = Math.max(maxR, currR);
			}
		} int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
			char curr = str.charAt(i);
			if (curr == 'S') {
				currR = 0;
			}
			else {
				currR++;
				maxR = Math.max(maxR, currR);
			}
		} {
			char curr = str.charAt(i);
			if (curr == 'S') {
				currR = 0;
			}
			else {
				currR++;
				maxR = Math.max(maxR, currR);
			}
		} char curr = str.charAt(i); curr str.charAt(i) str.charAt str i if (curr == 'S') {
				currR = 0;
			}
			else {
				currR++;
				maxR = Math.max(maxR, currR);
			} curr == 'S' curr 'S' {
				currR = 0;
			} currR = 0 currR 0 {
				currR++;
				maxR = Math.max(maxR, currR);
			} currR++ currR maxR = Math.max(maxR, currR) maxR Math.max(maxR, currR) Math.max Math maxR currR System.out.println(maxR) System.out.println System.out System System.out maxR reader.close() reader.close reader String[] args args public class Main {

	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		String str = reader.next();
		int maxR = 0, currR = 0;
		for (int i = 0; i < str.length(); i++) {
			char curr = str.charAt(i);
			if (curr == 'S') {
				currR = 0;
			}
			else {
				currR++;
				maxR = Math.max(maxR, currR);
			}
		}
		System.out.println(maxR);
		
		reader.close();
	}
	
} public class Main {

	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		String str = reader.next();
		int maxR = 0, currR = 0;
		for (int i = 0; i < str.length(); i++) {
			char curr = str.charAt(i);
			if (curr == 'S') {
				currR = 0;
			}
			else {
				currR++;
				maxR = Math.max(maxR, currR);
			}
		}
		System.out.println(maxR);
		
		reader.close();
	}
	
} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		String str = reader.next();
		int maxR = 0, currR = 0;
		for (int i = 0; i < str.length(); i++) {
			char curr = str.charAt(i);
			if (curr == 'S') {
				currR = 0;
			}
			else {
				currR++;
				maxR = Math.max(maxR, currR);
			}
		}
		System.out.println(maxR);
		
		reader.close();
	}
	
}
