import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int longestStreak = 0;
        int currentStreak = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'S') {
                currentStreak = 0;
            } else {
                currentStreak++;
                if (currentStreak > longestStreak) { 
                    longestStreak = currentStreak;
                }
            }
        }
        System.out.println(longestStreak);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int longestStreak = 0;
        int currentStreak = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'S') {
                currentStreak = 0;
            } else {
                currentStreak++;
                if (currentStreak > longestStreak) { 
                    longestStreak = currentStreak;
                }
            }
        }
        System.out.println(longestStreak);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int longestStreak = 0;
        int currentStreak = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'S') {
                currentStreak = 0;
            } else {
                currentStreak++;
                if (currentStreak > longestStreak) { 
                    longestStreak = currentStreak;
                }
            }
        }
        System.out.println(longestStreak);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int longestStreak = 0;
        int currentStreak = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'S') {
                currentStreak = 0;
            } else {
                currentStreak++;
                if (currentStreak > longestStreak) { 
                    longestStreak = currentStreak;
                }
            }
        }
        System.out.println(longestStreak);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int longestStreak = 0; longestStreak 0 int currentStreak = 0; currentStreak 0 for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'S') {
                currentStreak = 0;
            } else {
                currentStreak++;
                if (currentStreak > longestStreak) { 
                    longestStreak = currentStreak;
                }
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if (s.charAt(i) == 'S') {
                currentStreak = 0;
            } else {
                currentStreak++;
                if (currentStreak > longestStreak) { 
                    longestStreak = currentStreak;
                }
            }
        } {
            if (s.charAt(i) == 'S') {
                currentStreak = 0;
            } else {
                currentStreak++;
                if (currentStreak > longestStreak) { 
                    longestStreak = currentStreak;
                }
            }
        } if (s.charAt(i) == 'S') {
                currentStreak = 0;
            } else {
                currentStreak++;
                if (currentStreak > longestStreak) { 
                    longestStreak = currentStreak;
                }
            } s.charAt(i) == 'S' s.charAt(i) s.charAt s i 'S' {
                currentStreak = 0;
            } currentStreak = 0 currentStreak 0 {
                currentStreak++;
                if (currentStreak > longestStreak) { 
                    longestStreak = currentStreak;
                }
            } currentStreak++ currentStreak if (currentStreak > longestStreak) { 
                    longestStreak = currentStreak;
                } currentStreak > longestStreak currentStreak longestStreak { 
                    longestStreak = currentStreak;
                } longestStreak = currentStreak longestStreak currentStreak System.out.println(longestStreak) System.out.println System.out System System.out longestStreak String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int longestStreak = 0;
        int currentStreak = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'S') {
                currentStreak = 0;
            } else {
                currentStreak++;
                if (currentStreak > longestStreak) { 
                    longestStreak = currentStreak;
                }
            }
        }
        System.out.println(longestStreak);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int longestStreak = 0;
        int currentStreak = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'S') {
                currentStreak = 0;
            } else {
                currentStreak++;
                if (currentStreak > longestStreak) { 
                    longestStreak = currentStreak;
                }
            }
        }
        System.out.println(longestStreak);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int longestStreak = 0;
        int currentStreak = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'S') {
                currentStreak = 0;
            } else {
                currentStreak++;
                if (currentStreak > longestStreak) { 
                    longestStreak = currentStreak;
                }
            }
        }
        System.out.println(longestStreak);
    }
}
