import java.util.Scanner;
class Main
{
  public static void main(String args[])
  {
    int c,i;
    Scanner sc = new Scanner(System.in);
    String s=sc.nextLine();
    c=0;
    String str [] = s.split("S",-1);
    for(i=0;i<str.length;i++)
    {
      if(str[i].length()>c)
      c=str[i].length();
    }
    System.out.println(c);
  }
} import java.util.Scanner; Scanner java.util class Main
{
  public static void main(String args[])
  {
    int c,i;
    Scanner sc = new Scanner(System.in);
    String s=sc.nextLine();
    c=0;
    String str [] = s.split("S",-1);
    for(i=0;i<str.length;i++)
    {
      if(str[i].length()>c)
      c=str[i].length();
    }
    System.out.println(c);
  }
} Main public static void main(String args[])
  {
    int c,i;
    Scanner sc = new Scanner(System.in);
    String s=sc.nextLine();
    c=0;
    String str [] = s.split("S",-1);
    for(i=0;i<str.length;i++)
    {
      if(str[i].length()>c)
      c=str[i].length();
    }
    System.out.println(c);
  } main {
    int c,i;
    Scanner sc = new Scanner(System.in);
    String s=sc.nextLine();
    c=0;
    String str [] = s.split("S",-1);
    for(i=0;i<str.length;i++)
    {
      if(str[i].length()>c)
      c=str[i].length();
    }
    System.out.println(c);
  } int c c i; i Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s=sc.nextLine(); s sc.nextLine() sc.nextLine sc c=0 c 0 String str [] = s.split("S",-1); str s.split("S",-1) s.split s "S" -1 1 for(i=0;i<str.length;i++)
    {
      if(str[i].length()>c)
      c=str[i].length();
    } i=0; i=0 i 0 i<str.length i str.length str str.length i++ i++ i {
      if(str[i].length()>c)
      c=str[i].length();
    } {
      if(str[i].length()>c)
      c=str[i].length();
    } if(str[i].length()>c)
      c=str[i].length(); str[i].length()>c str[i].length() str[i].length str[i] str i c c=str[i].length() c str[i].length() str[i].length str[i] str i System.out.println(c) System.out.println System.out System System.out c String args[] args
import java.util.Scanner;
class Main
{
  public static void main(String args[])
  {
    int c,i;
    Scanner sc = new Scanner(System.in);
    String s=sc.nextLine();
    c=0;
    String str [] = s.split("S",-1);
    for(i=0;i<str.length;i++)
    {
      if(str[i].length()>c)
      c=str[i].length();
    }
    System.out.println(c);
  }
}