import java.util.Scanner; class No_104 { public static void main(String args[]) { Scanner stdIn = new Scanner(System.in); String road = stdIn.nextLine(); if (road.equals("")) { System.out.println(1); System.exit(0); } String[] lr = road.split(""); int N = 1; for (int i = 0; i < lr.length; i++) { if ( lr[i].equals("L")) { N *= 2; } else { N = (N * 2) + 1; } } System.out.println(N); } }