import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String s = scan.nextLine(); scan.close(); if(s.length() == 0) { System.out.println("1"); System.exit(0); } int l = s.length(); int h = (int)Math.pow(2, l); int k = 0; for(int i = 0; i < l; i++) { if(s.substring(i, i + 1).equals("R")) { if(k == 0) { k = 1; }else { k = 2 * k + 1; } }else { if(k == 0) { k = 0; }else { k = 2 * k; } } } int ans = k + h; System.out.println(ans); } }