import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String S = reader.readLine(); int route = 1; for (int i = 0; i < S.length(); i++) { if (S.charAt(i) == 'L') { route = route * 2; } else { route = route * 2 +1; } } System.out.println(route); } }