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