import java.util.Arrays;
import java.util.Scanner;
 
public class Main {
  public static void main(String[] args){
	  
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int X = sc.nextInt();
    int Y = sc.nextInt();
    int[] result = new int[3];
    int max = Math.max(X, Y);
    int min = Math.min(X, Y);
    int max_value = 0;
    if(max == X){
    	max_value = A;
    }
    if(max == Y){
    	max_value = B;
    }
    
    result[0] = 2 * C * max;
    result[1] = 2 * C * min + (max-min) * max_value;
    result[2] = A * X + B * Y;
    Arrays.sort(result);
    
    System.out.println(result[0]);
  }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args){
	  
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int X = sc.nextInt();
    int Y = sc.nextInt();
    int[] result = new int[3];
    int max = Math.max(X, Y);
    int min = Math.min(X, Y);
    int max_value = 0;
    if(max == X){
    	max_value = A;
    }
    if(max == Y){
    	max_value = B;
    }
    
    result[0] = 2 * C * max;
    result[1] = 2 * C * min + (max-min) * max_value;
    result[2] = A * X + B * Y;
    Arrays.sort(result);
    
    System.out.println(result[0]);
  }
} Main public static void main(String[] args){
	  
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int X = sc.nextInt();
    int Y = sc.nextInt();
    int[] result = new int[3];
    int max = Math.max(X, Y);
    int min = Math.min(X, Y);
    int max_value = 0;
    if(max == X){
    	max_value = A;
    }
    if(max == Y){
    	max_value = B;
    }
    
    result[0] = 2 * C * max;
    result[1] = 2 * C * min + (max-min) * max_value;
    result[2] = A * X + B * Y;
    Arrays.sort(result);
    
    System.out.println(result[0]);
  } main {
	  
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int X = sc.nextInt();
    int Y = sc.nextInt();
    int[] result = new int[3];
    int max = Math.max(X, Y);
    int min = Math.min(X, Y);
    int max_value = 0;
    if(max == X){
    	max_value = A;
    }
    if(max == Y){
    	max_value = B;
    }
    
    result[0] = 2 * C * max;
    result[1] = 2 * C * min + (max-min) * max_value;
    result[2] = A * X + B * Y;
    Arrays.sort(result);
    
    System.out.println(result[0]);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc int Y = sc.nextInt(); Y sc.nextInt() sc.nextInt sc int[] result = new int[3]; result new int[3] 3 int max = Math.max(X, Y); max Math.max(X, Y) Math.max Math X Y int min = Math.min(X, Y); min Math.min(X, Y) Math.min Math X Y int max_value = 0; max_value 0 if(max == X){
    	max_value = A;
    } max == X max X {
    	max_value = A;
    } max_value = A max_value A if(max == Y){
    	max_value = B;
    } max == Y max Y {
    	max_value = B;
    } max_value = B max_value B result[0] = 2 * C * max result[0] result 0 2 * C * max 2 * C * max 2 C max result[1] = 2 * C * min + (max-min) * max_value result[1] result 1 2 * C * min + (max-min) * max_value 2 * C * min 2 * C * min 2 C min (max-min) * max_value (max-min) max min max_value result[2] = A * X + B * Y result[2] result 2 A * X + B * Y A * X A X B * Y B Y Arrays.sort(result) Arrays.sort Arrays result System.out.println(result[0]) System.out.println System.out System System.out result[0] result 0 String[] args args public class Main {
  public static void main(String[] args){
	  
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int X = sc.nextInt();
    int Y = sc.nextInt();
    int[] result = new int[3];
    int max = Math.max(X, Y);
    int min = Math.min(X, Y);
    int max_value = 0;
    if(max == X){
    	max_value = A;
    }
    if(max == Y){
    	max_value = B;
    }
    
    result[0] = 2 * C * max;
    result[1] = 2 * C * min + (max-min) * max_value;
    result[2] = A * X + B * Y;
    Arrays.sort(result);
    
    System.out.println(result[0]);
  }
} public class Main {
  public static void main(String[] args){
	  
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int X = sc.nextInt();
    int Y = sc.nextInt();
    int[] result = new int[3];
    int max = Math.max(X, Y);
    int min = Math.min(X, Y);
    int max_value = 0;
    if(max == X){
    	max_value = A;
    }
    if(max == Y){
    	max_value = B;
    }
    
    result[0] = 2 * C * max;
    result[1] = 2 * C * min + (max-min) * max_value;
    result[2] = A * X + B * Y;
    Arrays.sort(result);
    
    System.out.println(result[0]);
  }
} Main
import java.util.Arrays;
import java.util.Scanner;
 
public class Main {
  public static void main(String[] args){
	  
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int X = sc.nextInt();
    int Y = sc.nextInt();
    int[] result = new int[3];
    int max = Math.max(X, Y);
    int min = Math.min(X, Y);
    int max_value = 0;
    if(max == X){
    	max_value = A;
    }
    if(max == Y){
    	max_value = B;
    }
    
    result[0] = 2 * C * max;
    result[1] = 2 * C * min + (max-min) * max_value;
    result[2] = A * X + B * Y;
    Arrays.sort(result);
    
    System.out.println(result[0]);
  }
}