import java.io.*;
import java.util.*;
class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		int t = 1;
		//int t = Integer.parseInt(reader.readLine());
		for(int i1 = 0;i1<t;i1++){
			char[] list = reader.readLine().toCharArray();
			int max = 0;
			int p = 0;
			for(int i = 0;i<3;i++){
					if(list[i]=='S'){
						max = Math.max(max,p);
						p=0;
					}
					else p++;
			}
			max = Math.max(p,max);
			System.out.println(	max);
		}
	}
} import java.io.*; io.* java import java.util.*; util.* java class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		int t = 1;
		//int t = Integer.parseInt(reader.readLine());
		for(int i1 = 0;i1<t;i1++){
			char[] list = reader.readLine().toCharArray();
			int max = 0;
			int p = 0;
			for(int i = 0;i<3;i++){
					if(list[i]=='S'){
						max = Math.max(max,p);
						p=0;
					}
					else p++;
			}
			max = Math.max(p,max);
			System.out.println(	max);
		}
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		int t = 1;
		//int t = Integer.parseInt(reader.readLine());
		for(int i1 = 0;i1<t;i1++){
			char[] list = reader.readLine().toCharArray();
			int max = 0;
			int p = 0;
			for(int i = 0;i<3;i++){
					if(list[i]=='S'){
						max = Math.max(max,p);
						p=0;
					}
					else p++;
			}
			max = Math.max(p,max);
			System.out.println(	max);
		}
	} main {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		int t = 1;
		//int t = Integer.parseInt(reader.readLine());
		for(int i1 = 0;i1<t;i1++){
			char[] list = reader.readLine().toCharArray();
			int max = 0;
			int p = 0;
			for(int i = 0;i<3;i++){
					if(list[i]=='S'){
						max = Math.max(max,p);
						p=0;
					}
					else p++;
			}
			max = Math.max(p,max);
			System.out.println(	max);
		}
	} BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) int t = 1; t 1 for(int i1 = 0;i1<t;i1++){
			char[] list = reader.readLine().toCharArray();
			int max = 0;
			int p = 0;
			for(int i = 0;i<3;i++){
					if(list[i]=='S'){
						max = Math.max(max,p);
						p=0;
					}
					else p++;
			}
			max = Math.max(p,max);
			System.out.println(	max);
		} int i1 = 0; int i1 = 0; i1 0 i1<t i1 t i1++ i1++ i1 {
			char[] list = reader.readLine().toCharArray();
			int max = 0;
			int p = 0;
			for(int i = 0;i<3;i++){
					if(list[i]=='S'){
						max = Math.max(max,p);
						p=0;
					}
					else p++;
			}
			max = Math.max(p,max);
			System.out.println(	max);
		} {
			char[] list = reader.readLine().toCharArray();
			int max = 0;
			int p = 0;
			for(int i = 0;i<3;i++){
					if(list[i]=='S'){
						max = Math.max(max,p);
						p=0;
					}
					else p++;
			}
			max = Math.max(p,max);
			System.out.println(	max);
		} char[] list = reader.readLine().toCharArray(); list reader.readLine().toCharArray() reader.readLine().toCharArray reader.readLine() reader.readLine reader int max = 0; max 0 int p = 0; p 0 for(int i = 0;i<3;i++){
					if(list[i]=='S'){
						max = Math.max(max,p);
						p=0;
					}
					else p++;
			} int i = 0; int i = 0; i 0 i<3 i 3 i++ i++ i {
					if(list[i]=='S'){
						max = Math.max(max,p);
						p=0;
					}
					else p++;
			} {
					if(list[i]=='S'){
						max = Math.max(max,p);
						p=0;
					}
					else p++;
			} if(list[i]=='S'){
						max = Math.max(max,p);
						p=0;
					}
					else p++; list[i]=='S' list[i] list i 'S' {
						max = Math.max(max,p);
						p=0;
					} max = Math.max(max,p) max Math.max(max,p) Math.max Math max p p=0 p 0 p++ p max = Math.max(p,max) max Math.max(p,max) Math.max Math p max System.out.println(	max) System.out.println System.out System System.out max String[] args args
import java.io.*;
import java.util.*;
class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		int t = 1;
		//int t = Integer.parseInt(reader.readLine());
		for(int i1 = 0;i1<t;i1++){
			char[] list = reader.readLine().toCharArray();
			int max = 0;
			int p = 0;
			for(int i = 0;i<3;i++){
					if(list[i]=='S'){
						max = Math.max(max,p);
						p=0;
					}
					else p++;
			}
			max = Math.max(p,max);
			System.out.println(	max);
		}
	}
}