import java.util.*;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            String[] s = sc.next().split("S");
            int max = 0;
            for (String str : s) {
                max = Math.max(str.length(), max);
            }
            System.out.println(max);
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            String[] s = sc.next().split("S");
            int max = 0;
            for (String str : s) {
                max = Math.max(str.length(), max);
            }
            System.out.println(max);
        }
    }
} Main public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            String[] s = sc.next().split("S");
            int max = 0;
            for (String str : s) {
                max = Math.max(str.length(), max);
            }
            System.out.println(max);
        }
    } main {
        try (Scanner sc = new Scanner(System.in)) {
            String[] s = sc.next().split("S");
            int max = 0;
            for (String str : s) {
                max = Math.max(str.length(), max);
            }
            System.out.println(max);
        }
    } try (Scanner sc = new Scanner(System.in)) {
            String[] s = sc.next().split("S");
            int max = 0;
            for (String str : s) {
                max = Math.max(str.length(), max);
            }
            System.out.println(max);
        } {
            String[] s = sc.next().split("S");
            int max = 0;
            for (String str : s) {
                max = Math.max(str.length(), max);
            }
            System.out.println(max);
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) String[] s = sc.next().split("S"); s sc.next().split("S") sc.next().split sc.next() sc.next sc "S" int max = 0; max 0 for (String str : s) {
                max = Math.max(str.length(), max);
            } String str s {
                max = Math.max(str.length(), max);
            } {
                max = Math.max(str.length(), max);
            } max = Math.max(str.length(), max) max Math.max(str.length(), max) Math.max Math str.length() str.length str max System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            String[] s = sc.next().split("S");
            int max = 0;
            for (String str : s) {
                max = Math.max(str.length(), max);
            }
            System.out.println(max);
        }
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            String[] s = sc.next().split("S");
            int max = 0;
            for (String str : s) {
                max = Math.max(str.length(), max);
            }
            System.out.println(max);
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            String[] s = sc.next().split("S");
            int max = 0;
            for (String str : s) {
                max = Math.max(str.length(), max);
            }
            System.out.println(max);
        }
    }
}
