package m.shin; import java.util.Scanner; public class Con104 { public static void main(String[] args) { Scanner s = new Scanner(System.in); String lr = s.nextLine(); s.close(); long now = 1; for(int i = 0;i < lr.length();i++){ if(lr.charAt(i) == 'L'){ now *= 2; }else{ now *= 2; now++; } } System.out.println(now); } }