import java.util.Scanner; class S24_route{ public static void main(String[] args){ int route = 1; String c[] = new String[30]; Scanner scn = new Scanner(System.in); c = scn.next().split(""); for(int i = 0; i < c.length; i++){ if("L".equals(c[i])){ route *= 2; }else{ route *= 2; route += 1; } } System.out.println(route); } }