//package com.company;
import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        char[] days = br.readLine().toCharArray();
        int max = 0;
        int curr = 0;
        for (char c : days) {
            if (c == 'S') {
                max = Math.max(max, curr);
                curr = 0;
            } else if (c == 'R') {
                ++curr;
            }
        }
        max = Math.max(curr, max);
        pw.println(max);
        pw.close();
    }
} import java.util.*; util.* java import java.io.*; io.* java import java.lang.*; lang.* java import java.math.*; math.* java public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        char[] days = br.readLine().toCharArray();
        int max = 0;
        int curr = 0;
        for (char c : days) {
            if (c == 'S') {
                max = Math.max(max, curr);
                curr = 0;
            } else if (c == 'R') {
                ++curr;
            }
        }
        max = Math.max(curr, max);
        pw.println(max);
        pw.close();
    }
} Main public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        char[] days = br.readLine().toCharArray();
        int max = 0;
        int curr = 0;
        for (char c : days) {
            if (c == 'S') {
                max = Math.max(max, curr);
                curr = 0;
            } else if (c == 'R') {
                ++curr;
            }
        }
        max = Math.max(curr, max);
        pw.println(max);
        pw.close();
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        char[] days = br.readLine().toCharArray();
        int max = 0;
        int curr = 0;
        for (char c : days) {
            if (c == 'S') {
                max = Math.max(max, curr);
                curr = 0;
            } else if (c == 'R') {
                ++curr;
            }
        }
        max = Math.max(curr, max);
        pw.println(max);
        pw.close();
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))); pw new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) char[] days = br.readLine().toCharArray(); days br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br int max = 0; max 0 int curr = 0; curr 0 for (char c : days) {
            if (c == 'S') {
                max = Math.max(max, curr);
                curr = 0;
            } else if (c == 'R') {
                ++curr;
            }
        } char c days {
            if (c == 'S') {
                max = Math.max(max, curr);
                curr = 0;
            } else if (c == 'R') {
                ++curr;
            }
        } {
            if (c == 'S') {
                max = Math.max(max, curr);
                curr = 0;
            } else if (c == 'R') {
                ++curr;
            }
        } if (c == 'S') {
                max = Math.max(max, curr);
                curr = 0;
            } else if (c == 'R') {
                ++curr;
            } c == 'S' c 'S' {
                max = Math.max(max, curr);
                curr = 0;
            } max = Math.max(max, curr) max Math.max(max, curr) Math.max Math max curr curr = 0 curr 0 if (c == 'R') {
                ++curr;
            } c == 'R' c 'R' {
                ++curr;
            } ++curr curr max = Math.max(curr, max) max Math.max(curr, max) Math.max Math curr max pw.println(max) pw.println pw max pw.close() pw.close pw String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        char[] days = br.readLine().toCharArray();
        int max = 0;
        int curr = 0;
        for (char c : days) {
            if (c == 'S') {
                max = Math.max(max, curr);
                curr = 0;
            } else if (c == 'R') {
                ++curr;
            }
        }
        max = Math.max(curr, max);
        pw.println(max);
        pw.close();
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        char[] days = br.readLine().toCharArray();
        int max = 0;
        int curr = 0;
        for (char c : days) {
            if (c == 'S') {
                max = Math.max(max, curr);
                curr = 0;
            } else if (c == 'R') {
                ++curr;
            }
        }
        max = Math.max(curr, max);
        pw.println(max);
        pw.close();
    }
} Main
//package com.company;
import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        char[] days = br.readLine().toCharArray();
        int max = 0;
        int curr = 0;
        for (char c : days) {
            if (c == 'S') {
                max = Math.max(max, curr);
                curr = 0;
            } else if (c == 'R') {
                ++curr;
            }
        }
        max = Math.max(curr, max);
        pw.println(max);
        pw.close();
    }
}