import java.util.*; class No0104{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String s = sc.nextLine(); int now = 1; for(int i = 0; i < s.length(); i++){ if(s.charAt(i) == 'L'){ now *= 2; }else if(s.charAt(i) == 'R'){ now = now * 2 + 1; } } System.out.println(now); } }