public class No_104 { public static void main(String[] args) { java.util.Scanner sc = new java.util.Scanner(System.in); int root = 1; if (!sc.hasNext()) { System.out.println(root); System.exit(0); } char[] LorR = sc.next().toCharArray(); for (char c : LorR) { if (c == 'L') root *= 2; else if (c == 'R') root = root * 2 + 1; } System.out.println(root); sc.close(); } }