import java.util.Scanner;
public class D {
public static void main(String[] args) {
int an;
Scanner sc = new Scanner(System.in);
System.out.println("vvedite c");
int c = sc.nextInt();
System.out.println("vvedite b");
int b = sc.nextInt();
an= 12 * Math.max(c,b) + Math.min(2*c,b-1);
}
}