class C{ public static void main(String[]$){ int v=1; for(char c:new java.util.Scanner(System.in).next().toCharArray()) { if(c=='L')v*=2; if(c=='R')v+=v+1; } System.out.println(v); } }