import java.io.*; public class Yukicoder104 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String s = br.readLine(); int res = 1; for (int i = 0; i < s.length(); i++) res = s.charAt(i) == 'L' ? res * 2 : res * 2 + 1; System.out.println(res); } }