import java.io.*; public class No104{ public static void main(String[] args) throws IOException{ String str = new BufferedReader(new InputStreamReader(System.in)).readLine(); if(str == null){ System.out.println(1); return; } else{ char[] direction = str.toCharArray(); long roadNum = 1; System.out.println(calc(roadNum, direction)); } } public static long calc(long a, char[] b){ for(int i=0; i < b.length; i++){ if(b[i] == 'R') a = (a * 2) + 1; if(b[i] == 'L') a *= 2; } return a; } }