import java.util.*; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); try{ String input=sc.next(); String[] L_R=input.split(""); int load=1; for(String curb:L_R){ if(curb.equals("L")){ load*=2; }else{ load=load*2+1; } } System.out.println(load); }catch(Exception e){ System.out.println(1); } } }