import java.io.*; public class Run { public static void main (String arg[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String S = br.readLine(); int Road = 1; for (int i = 0; i < S.length(); i++) { Road *= 2; if (S.charAt(i)=='R') Road++; } System.out.println(Road); } }