import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.nextLine(); int current = 1; for (char c : s.toCharArray()) { if (c == 'L') { current *= 2; } else { current = current * 2 + 1; } } System.out.println(current); } }