import java.security.SecureRandom;
import java.sql.Array;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int count = 0;
//       if (s.charAt(0)=='R')count++;
//       else count=0;
//       if (s.charAt(1)=='R')count++;
//       else count=0;
//        if (s.charAt(2)=='R')count++;
//        else count=0;
        int max = Integer.MIN_VALUE;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') count++;
            else count = 0;
            if (count > max) max = count;
        }

            System.out.println(max);

    }
    } import java.security.SecureRandom; SecureRandom java.security import java.sql.Array; Array java.sql 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 count = 0;
//       if (s.charAt(0)=='R')count++;
//       else count=0;
//       if (s.charAt(1)=='R')count++;
//       else count=0;
//        if (s.charAt(2)=='R')count++;
//        else count=0;
        int max = Integer.MIN_VALUE;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') count++;
            else count = 0;
            if (count > max) max = count;
        }

            System.out.println(max);

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

        int count = 0;
//       if (s.charAt(0)=='R')count++;
//       else count=0;
//       if (s.charAt(1)=='R')count++;
//       else count=0;
//        if (s.charAt(2)=='R')count++;
//        else count=0;
        int max = Integer.MIN_VALUE;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') count++;
            else count = 0;
            if (count > max) max = count;
        }

            System.out.println(max);

    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int count = 0;
//       if (s.charAt(0)=='R')count++;
//       else count=0;
//       if (s.charAt(1)=='R')count++;
//       else count=0;
//        if (s.charAt(2)=='R')count++;
//        else count=0;
        int max = Integer.MIN_VALUE;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') count++;
            else count = 0;
            if (count > max) max = count;
        }

            System.out.println(max);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int count = 0; count 0 int max = Integer.MIN_VALUE; max Integer.MIN_VALUE Integer Integer.MIN_VALUE for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') count++;
            else count = 0;
            if (count > max) max = count;
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if (s.charAt(i) == 'R') count++;
            else count = 0;
            if (count > max) max = count;
        } {
            if (s.charAt(i) == 'R') count++;
            else count = 0;
            if (count > max) max = count;
        } if (s.charAt(i) == 'R') count++;
            else count = 0; s.charAt(i) == 'R' s.charAt(i) s.charAt s i 'R' count++ count count = 0 count 0 if (count > max) max = count; count > max count max max = count max count 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) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int count = 0;
//       if (s.charAt(0)=='R')count++;
//       else count=0;
//       if (s.charAt(1)=='R')count++;
//       else count=0;
//        if (s.charAt(2)=='R')count++;
//        else count=0;
        int max = Integer.MIN_VALUE;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') count++;
            else count = 0;
            if (count > max) max = count;
        }

            System.out.println(max);

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

        int count = 0;
//       if (s.charAt(0)=='R')count++;
//       else count=0;
//       if (s.charAt(1)=='R')count++;
//       else count=0;
//        if (s.charAt(2)=='R')count++;
//        else count=0;
        int max = Integer.MIN_VALUE;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') count++;
            else count = 0;
            if (count > max) max = count;
        }

            System.out.println(max);

    }
    } Main
import java.security.SecureRandom;
import java.sql.Array;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int count = 0;
//       if (s.charAt(0)=='R')count++;
//       else count=0;
//       if (s.charAt(1)=='R')count++;
//       else count=0;
//        if (s.charAt(2)=='R')count++;
//        else count=0;
        int max = Integer.MIN_VALUE;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') count++;
            else count = 0;
            if (count > max) max = count;
        }

            System.out.println(max);

    }
    }
