import java.util.*;
import java.lang.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = "";
        while(sc.hasNext()) {
            int count = 0;
            s = sc.nextLine();
            if (s.equalsIgnoreCase("ssr") || s.equalsIgnoreCase("srs") || s.equalsIgnoreCase("rss") || s.equalsIgnoreCase("rsr")) {
                count = 1;
            }
            else if (s.equalsIgnoreCase("rrs") || s.equalsIgnoreCase("srr")) {
                count = 2;
            }
            else if(s.equalsIgnoreCase("rrr")) {
                count = 3;
            }
            else
                count = 0;
            System.out.println(count);                
        }
        
    }
} import java.util.*; util.* java import java.lang.*; lang.* java class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = "";
        while(sc.hasNext()) {
            int count = 0;
            s = sc.nextLine();
            if (s.equalsIgnoreCase("ssr") || s.equalsIgnoreCase("srs") || s.equalsIgnoreCase("rss") || s.equalsIgnoreCase("rsr")) {
                count = 1;
            }
            else if (s.equalsIgnoreCase("rrs") || s.equalsIgnoreCase("srr")) {
                count = 2;
            }
            else if(s.equalsIgnoreCase("rrr")) {
                count = 3;
            }
            else
                count = 0;
            System.out.println(count);                
        }
        
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = "";
        while(sc.hasNext()) {
            int count = 0;
            s = sc.nextLine();
            if (s.equalsIgnoreCase("ssr") || s.equalsIgnoreCase("srs") || s.equalsIgnoreCase("rss") || s.equalsIgnoreCase("rsr")) {
                count = 1;
            }
            else if (s.equalsIgnoreCase("rrs") || s.equalsIgnoreCase("srr")) {
                count = 2;
            }
            else if(s.equalsIgnoreCase("rrr")) {
                count = 3;
            }
            else
                count = 0;
            System.out.println(count);                
        }
        
    } main {
        Scanner sc = new Scanner(System.in);
        String s = "";
        while(sc.hasNext()) {
            int count = 0;
            s = sc.nextLine();
            if (s.equalsIgnoreCase("ssr") || s.equalsIgnoreCase("srs") || s.equalsIgnoreCase("rss") || s.equalsIgnoreCase("rsr")) {
                count = 1;
            }
            else if (s.equalsIgnoreCase("rrs") || s.equalsIgnoreCase("srr")) {
                count = 2;
            }
            else if(s.equalsIgnoreCase("rrr")) {
                count = 3;
            }
            else
                count = 0;
            System.out.println(count);                
        }
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = ""; s "" while(sc.hasNext()) {
            int count = 0;
            s = sc.nextLine();
            if (s.equalsIgnoreCase("ssr") || s.equalsIgnoreCase("srs") || s.equalsIgnoreCase("rss") || s.equalsIgnoreCase("rsr")) {
                count = 1;
            }
            else if (s.equalsIgnoreCase("rrs") || s.equalsIgnoreCase("srr")) {
                count = 2;
            }
            else if(s.equalsIgnoreCase("rrr")) {
                count = 3;
            }
            else
                count = 0;
            System.out.println(count);                
        } sc.hasNext() sc.hasNext sc {
            int count = 0;
            s = sc.nextLine();
            if (s.equalsIgnoreCase("ssr") || s.equalsIgnoreCase("srs") || s.equalsIgnoreCase("rss") || s.equalsIgnoreCase("rsr")) {
                count = 1;
            }
            else if (s.equalsIgnoreCase("rrs") || s.equalsIgnoreCase("srr")) {
                count = 2;
            }
            else if(s.equalsIgnoreCase("rrr")) {
                count = 3;
            }
            else
                count = 0;
            System.out.println(count);                
        } int count = 0; count 0 s = sc.nextLine() s sc.nextLine() sc.nextLine sc if (s.equalsIgnoreCase("ssr") || s.equalsIgnoreCase("srs") || s.equalsIgnoreCase("rss") || s.equalsIgnoreCase("rsr")) {
                count = 1;
            }
            else if (s.equalsIgnoreCase("rrs") || s.equalsIgnoreCase("srr")) {
                count = 2;
            }
            else if(s.equalsIgnoreCase("rrr")) {
                count = 3;
            }
            else
                count = 0; s.equalsIgnoreCase("ssr") || s.equalsIgnoreCase("srs") || s.equalsIgnoreCase("rss") || s.equalsIgnoreCase("rsr") s.equalsIgnoreCase("rss") s.equalsIgnoreCase("ssr") || s.equalsIgnoreCase("srs") || s.equalsIgnoreCase("rss") || s.equalsIgnoreCase("rsr") s.equalsIgnoreCase("ssr") s.equalsIgnoreCase s "ssr" s.equalsIgnoreCase("srs") s.equalsIgnoreCase s "srs" s.equalsIgnoreCase("rss") s.equalsIgnoreCase s "rss" s.equalsIgnoreCase("rsr") s.equalsIgnoreCase s "rsr" {
                count = 1;
            } count = 1 count 1 if (s.equalsIgnoreCase("rrs") || s.equalsIgnoreCase("srr")) {
                count = 2;
            }
            else if(s.equalsIgnoreCase("rrr")) {
                count = 3;
            }
            else
                count = 0; s.equalsIgnoreCase("rrs") || s.equalsIgnoreCase("srr") s.equalsIgnoreCase("rrs") s.equalsIgnoreCase s "rrs" s.equalsIgnoreCase("srr") s.equalsIgnoreCase s "srr" {
                count = 2;
            } count = 2 count 2 if(s.equalsIgnoreCase("rrr")) {
                count = 3;
            }
            else
                count = 0; s.equalsIgnoreCase("rrr") s.equalsIgnoreCase s "rrr" {
                count = 3;
            } count = 3 count 3 count = 0 count 0 System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.util.*;
import java.lang.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = "";
        while(sc.hasNext()) {
            int count = 0;
            s = sc.nextLine();
            if (s.equalsIgnoreCase("ssr") || s.equalsIgnoreCase("srs") || s.equalsIgnoreCase("rss") || s.equalsIgnoreCase("rsr")) {
                count = 1;
            }
            else if (s.equalsIgnoreCase("rrs") || s.equalsIgnoreCase("srr")) {
                count = 2;
            }
            else if(s.equalsIgnoreCase("rrr")) {
                count = 3;
            }
            else
                count = 0;
            System.out.println(count);                
        }
        
    }
}