import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String str_scan = scan.nextLine();

    int ans = 0;

    switch (str_scan) {
      case "RSS":
        ans=1;
        break;
      case "SRS":
        ans=1;
        break;
      case "RSR":
        ans=1;
        break;
      case "SSR":
        ans=1;
        break;
      case "SRR":
        ans=2;
        break;
      case "RRS":
        ans=2;
        break;
      case "RRR":
        ans=3;
        break;
      default:
        ans=0;
    }

    System.out.println(ans);
    scan.close();
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String str_scan = scan.nextLine();

    int ans = 0;

    switch (str_scan) {
      case "RSS":
        ans=1;
        break;
      case "SRS":
        ans=1;
        break;
      case "RSR":
        ans=1;
        break;
      case "SSR":
        ans=1;
        break;
      case "SRR":
        ans=2;
        break;
      case "RRS":
        ans=2;
        break;
      case "RRR":
        ans=3;
        break;
      default:
        ans=0;
    }

    System.out.println(ans);
    scan.close();
  }
} Main public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String str_scan = scan.nextLine();

    int ans = 0;

    switch (str_scan) {
      case "RSS":
        ans=1;
        break;
      case "SRS":
        ans=1;
        break;
      case "RSR":
        ans=1;
        break;
      case "SSR":
        ans=1;
        break;
      case "SRR":
        ans=2;
        break;
      case "RRS":
        ans=2;
        break;
      case "RRR":
        ans=3;
        break;
      default:
        ans=0;
    }

    System.out.println(ans);
    scan.close();
  } main {
    Scanner scan = new Scanner(System.in);
    String str_scan = scan.nextLine();

    int ans = 0;

    switch (str_scan) {
      case "RSS":
        ans=1;
        break;
      case "SRS":
        ans=1;
        break;
      case "RSR":
        ans=1;
        break;
      case "SSR":
        ans=1;
        break;
      case "SRR":
        ans=2;
        break;
      case "RRS":
        ans=2;
        break;
      case "RRR":
        ans=3;
        break;
      default:
        ans=0;
    }

    System.out.println(ans);
    scan.close();
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str_scan = scan.nextLine(); str_scan scan.nextLine() scan.nextLine scan int ans = 0; ans 0 switch (str_scan) {
      case "RSS":
        ans=1;
        break;
      case "SRS":
        ans=1;
        break;
      case "RSR":
        ans=1;
        break;
      case "SSR":
        ans=1;
        break;
      case "SRR":
        ans=2;
        break;
      case "RRS":
        ans=2;
        break;
      case "RRR":
        ans=3;
        break;
      default:
        ans=0;
    } str_scan case "RSS": "RSS" case "RSS": ans=1 ans 1 break; case "SRS": "SRS" case "SRS": ans=1 ans 1 break; case "RSR": "RSR" case "RSR": ans=1 ans 1 break; case "SSR": "SSR" case "SSR": ans=1 ans 1 break; case "SRR": "SRR" case "SRR": ans=2 ans 2 break; case "RRS": "RRS" case "RRS": ans=2 ans 2 break; case "RRR": "RRR" case "RRR": ans=3 ans 3 break; default: default: ans=0 ans 0 System.out.println(ans) System.out.println System.out System System.out ans scan.close() scan.close scan String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String str_scan = scan.nextLine();

    int ans = 0;

    switch (str_scan) {
      case "RSS":
        ans=1;
        break;
      case "SRS":
        ans=1;
        break;
      case "RSR":
        ans=1;
        break;
      case "SSR":
        ans=1;
        break;
      case "SRR":
        ans=2;
        break;
      case "RRS":
        ans=2;
        break;
      case "RRR":
        ans=3;
        break;
      default:
        ans=0;
    }

    System.out.println(ans);
    scan.close();
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String str_scan = scan.nextLine();

    int ans = 0;

    switch (str_scan) {
      case "RSS":
        ans=1;
        break;
      case "SRS":
        ans=1;
        break;
      case "RSR":
        ans=1;
        break;
      case "SSR":
        ans=1;
        break;
      case "SRR":
        ans=2;
        break;
      case "RRS":
        ans=2;
        break;
      case "RRR":
        ans=3;
        break;
      default:
        ans=0;
    }

    System.out.println(ans);
    scan.close();
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String str_scan = scan.nextLine();

    int ans = 0;

    switch (str_scan) {
      case "RSS":
        ans=1;
        break;
      case "SRS":
        ans=1;
        break;
      case "RSR":
        ans=1;
        break;
      case "SSR":
        ans=1;
        break;
      case "SRR":
        ans=2;
        break;
      case "RRS":
        ans=2;
        break;
      case "RRR":
        ans=3;
        break;
      default:
        ans=0;
    }

    System.out.println(ans);
    scan.close();
  }
}