
import org.w3c.dom.ls.LSInput;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;


public class Main {

    public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);
        String n1 = sc.next();

        int count = 0;
        String s = null;
        for (int i = 0; i < 3; i++) {
            if (n1.substring(i, i + 1).equals(s) || count == 0) {
               if(n1.substring(i, i + 1).equals("R")) {
                   count++;
               }
            }
            s = n1.substring(i, i + 1);
        }

        p(String.valueOf(count));
    }

    static void p(String s) { System.out.println(s); }
} import org.w3c.dom.ls.LSInput; LSInput org.w3c.dom.ls import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);
        String n1 = sc.next();

        int count = 0;
        String s = null;
        for (int i = 0; i < 3; i++) {
            if (n1.substring(i, i + 1).equals(s) || count == 0) {
               if(n1.substring(i, i + 1).equals("R")) {
                   count++;
               }
            }
            s = n1.substring(i, i + 1);
        }

        p(String.valueOf(count));
    }

    static void p(String s) { System.out.println(s); }
} Main public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);
        String n1 = sc.next();

        int count = 0;
        String s = null;
        for (int i = 0; i < 3; i++) {
            if (n1.substring(i, i + 1).equals(s) || count == 0) {
               if(n1.substring(i, i + 1).equals("R")) {
                   count++;
               }
            }
            s = n1.substring(i, i + 1);
        }

        p(String.valueOf(count));
    } main {


        Scanner sc = new Scanner(System.in);
        String n1 = sc.next();

        int count = 0;
        String s = null;
        for (int i = 0; i < 3; i++) {
            if (n1.substring(i, i + 1).equals(s) || count == 0) {
               if(n1.substring(i, i + 1).equals("R")) {
                   count++;
               }
            }
            s = n1.substring(i, i + 1);
        }

        p(String.valueOf(count));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String n1 = sc.next(); n1 sc.next() sc.next sc int count = 0; count 0 String s = null; s null for (int i = 0; i < 3; i++) {
            if (n1.substring(i, i + 1).equals(s) || count == 0) {
               if(n1.substring(i, i + 1).equals("R")) {
                   count++;
               }
            }
            s = n1.substring(i, i + 1);
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            if (n1.substring(i, i + 1).equals(s) || count == 0) {
               if(n1.substring(i, i + 1).equals("R")) {
                   count++;
               }
            }
            s = n1.substring(i, i + 1);
        } {
            if (n1.substring(i, i + 1).equals(s) || count == 0) {
               if(n1.substring(i, i + 1).equals("R")) {
                   count++;
               }
            }
            s = n1.substring(i, i + 1);
        } if (n1.substring(i, i + 1).equals(s) || count == 0) {
               if(n1.substring(i, i + 1).equals("R")) {
                   count++;
               }
            } n1.substring(i, i + 1).equals(s) || count == 0 n1.substring(i, i + 1).equals(s) n1.substring(i, i + 1).equals n1.substring(i, i + 1) n1.substring n1 i i + 1 i 1 s count == 0 count 0 {
               if(n1.substring(i, i + 1).equals("R")) {
                   count++;
               }
            } if(n1.substring(i, i + 1).equals("R")) {
                   count++;
               } n1.substring(i, i + 1).equals("R") n1.substring(i, i + 1).equals n1.substring(i, i + 1) n1.substring n1 i i + 1 i 1 "R" {
                   count++;
               } count++ count s = n1.substring(i, i + 1) s n1.substring(i, i + 1) n1.substring n1 i i + 1 i 1 p(String.valueOf(count)) p String.valueOf(count) String.valueOf String count String[] args args static void p(String s) { System.out.println(s); } p { System.out.println(s); } System.out.println(s) System.out.println System.out System System.out s String s s public class Main {

    public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);
        String n1 = sc.next();

        int count = 0;
        String s = null;
        for (int i = 0; i < 3; i++) {
            if (n1.substring(i, i + 1).equals(s) || count == 0) {
               if(n1.substring(i, i + 1).equals("R")) {
                   count++;
               }
            }
            s = n1.substring(i, i + 1);
        }

        p(String.valueOf(count));
    }

    static void p(String s) { System.out.println(s); }
} public class Main {

    public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);
        String n1 = sc.next();

        int count = 0;
        String s = null;
        for (int i = 0; i < 3; i++) {
            if (n1.substring(i, i + 1).equals(s) || count == 0) {
               if(n1.substring(i, i + 1).equals("R")) {
                   count++;
               }
            }
            s = n1.substring(i, i + 1);
        }

        p(String.valueOf(count));
    }

    static void p(String s) { System.out.println(s); }
} Main

import org.w3c.dom.ls.LSInput;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;


public class Main {

    public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);
        String n1 = sc.next();

        int count = 0;
        String s = null;
        for (int i = 0; i < 3; i++) {
            if (n1.substring(i, i + 1).equals(s) || count == 0) {
               if(n1.substring(i, i + 1).equals("R")) {
                   count++;
               }
            }
            s = n1.substring(i, i + 1);
        }

        p(String.valueOf(count));
    }

    static void p(String s) { System.out.println(s); }
}
