package me.yukicoder.lv1; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No0104 { public static void main(String[] args) { try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { String[] array = br.readLine().split(""); int route = 1; for (String s : array) { if (s.equals("L")) { route *= 2; } else if (s.equals("R")) { route = (route * 2) + 1; } } System.out.println(route); } catch (IOException e) { e.printStackTrace(); } } }