import java.util.*; import java.math.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int at = 1; char[] in = sc.nextLine().toCharArray(); for(int i = 0; i < in.length; i++) { if(in[i] == 'R') { at = at*2+1; } else { at = at*2; } } System.out.println(at); } }