import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); try { String str = buff.readLine(); int line = 1; for(int i = 0; i < str.length(); ++i){ line *= 2; char ch = str.charAt(i); if(ch == 'R'){ line++; } } System.out.println(line); } catch (NumberFormatException e) { e.getStackTrace(); } catch (IOException e) { e.getStackTrace(); } catch (Exception e) { e.getStackTrace(); } } }