import java.util.Scanner; public class Main_yukicoder104 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] s = sc.nextLine().toCharArray(); int ret = 1; for (int i = 0; i < s.length; i++) { ret <<= 1; if (s[i] == 'R') { ret |= 1; } } System.out.println(ret); sc.close(); } }