import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No00000104_Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] arr = br.readLine().split(""); int rootNo = 1; for(int i = 0; i < arr.length ; i++) { if("L".equals(arr[i])) { rootNo = 2 * rootNo; } else if("R".equals(arr[i])) { rootNo = 2 * rootNo + 1; } } System.out.println(rootNo); } }