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 sum1 = 0;
    	int sum2 = 0;
    	int sum3 = 0;

    	//aピザ　bピザ
    	sum1 = a * x + b * y;

    	//abピザも購入
    	if (x < y){
    		sum2 = x * c * 2 + (y - x) * b;
    		sum3 = y * c * 2;

    	} else {
    		sum2 = y * c * 2+ (x - y) * a;
    		sum3 = x * c * 2;
    	}


    	// 出力
    	//System.out.println(sum1);
    	//System.out.println(sum2);
    	System.out.println(Math.min(Math.min(sum1, sum2), sum3));
    }
} 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 sum1 = 0;
    	int sum2 = 0;
    	int sum3 = 0;

    	//aピザ　bピザ
    	sum1 = a * x + b * y;

    	//abピザも購入
    	if (x < y){
    		sum2 = x * c * 2 + (y - x) * b;
    		sum3 = y * c * 2;

    	} else {
    		sum2 = y * c * 2+ (x - y) * a;
    		sum3 = x * c * 2;
    	}


    	// 出力
    	//System.out.println(sum1);
    	//System.out.println(sum2);
    	System.out.println(Math.min(Math.min(sum1, sum2), sum3));
    }
} 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 sum1 = 0;
    	int sum2 = 0;
    	int sum3 = 0;

    	//aピザ　bピザ
    	sum1 = a * x + b * y;

    	//abピザも購入
    	if (x < y){
    		sum2 = x * c * 2 + (y - x) * b;
    		sum3 = y * c * 2;

    	} else {
    		sum2 = y * c * 2+ (x - y) * a;
    		sum3 = x * c * 2;
    	}


    	// 出力
    	//System.out.println(sum1);
    	//System.out.println(sum2);
    	System.out.println(Math.min(Math.min(sum1, sum2), sum3));
    } 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 sum1 = 0;
    	int sum2 = 0;
    	int sum3 = 0;

    	//aピザ　bピザ
    	sum1 = a * x + b * y;

    	//abピザも購入
    	if (x < y){
    		sum2 = x * c * 2 + (y - x) * b;
    		sum3 = y * c * 2;

    	} else {
    		sum2 = y * c * 2+ (x - y) * a;
    		sum3 = x * c * 2;
    	}


    	// 出力
    	//System.out.println(sum1);
    	//System.out.println(sum2);
    	System.out.println(Math.min(Math.min(sum1, sum2), sum3));
    } 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 sum1 = 0; sum1 0 int sum2 = 0; sum2 0 int sum3 = 0; sum3 0 sum1 = a * x + b * y sum1 a * x + b * y a * x a x b * y b y if (x < y){
    		sum2 = x * c * 2 + (y - x) * b;
    		sum3 = y * c * 2;

    	} else {
    		sum2 = y * c * 2+ (x - y) * a;
    		sum3 = x * c * 2;
    	} x < y x y {
    		sum2 = x * c * 2 + (y - x) * b;
    		sum3 = y * c * 2;

    	} sum2 = x * c * 2 + (y - x) * b sum2 x * c * 2 + (y - x) * b x * c * 2 x * c * 2 x c 2 (y - x) * b (y - x) y x b sum3 = y * c * 2 sum3 y * c * 2 y * c * 2 y c 2 {
    		sum2 = y * c * 2+ (x - y) * a;
    		sum3 = x * c * 2;
    	} sum2 = y * c * 2+ (x - y) * a sum2 y * c * 2+ (x - y) * a y * c * 2 y * c * 2 y c 2 (x - y) * a (x - y) x y a sum3 = x * c * 2 sum3 x * c * 2 x * c * 2 x c 2 System.out.println(Math.min(Math.min(sum1, sum2), sum3)) System.out.println System.out System System.out Math.min(Math.min(sum1, sum2), sum3) Math.min Math Math.min(sum1, sum2) Math.min Math sum1 sum2 sum3 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 sum1 = 0;
    	int sum2 = 0;
    	int sum3 = 0;

    	//aピザ　bピザ
    	sum1 = a * x + b * y;

    	//abピザも購入
    	if (x < y){
    		sum2 = x * c * 2 + (y - x) * b;
    		sum3 = y * c * 2;

    	} else {
    		sum2 = y * c * 2+ (x - y) * a;
    		sum3 = x * c * 2;
    	}


    	// 出力
    	//System.out.println(sum1);
    	//System.out.println(sum2);
    	System.out.println(Math.min(Math.min(sum1, sum2), sum3));
    }
} 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 sum1 = 0;
    	int sum2 = 0;
    	int sum3 = 0;

    	//aピザ　bピザ
    	sum1 = a * x + b * y;

    	//abピザも購入
    	if (x < y){
    		sum2 = x * c * 2 + (y - x) * b;
    		sum3 = y * c * 2;

    	} else {
    		sum2 = y * c * 2+ (x - y) * a;
    		sum3 = x * c * 2;
    	}


    	// 出力
    	//System.out.println(sum1);
    	//System.out.println(sum2);
    	System.out.println(Math.min(Math.min(sum1, sum2), sum3));
    }
} Main
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 sum1 = 0;
    	int sum2 = 0;
    	int sum3 = 0;

    	//aピザ　bピザ
    	sum1 = a * x + b * y;

    	//abピザも購入
    	if (x < y){
    		sum2 = x * c * 2 + (y - x) * b;
    		sum3 = y * c * 2;

    	} else {
    		sum2 = y * c * 2+ (x - y) * a;
    		sum3 = x * c * 2;
    	}


    	// 出力
    	//System.out.println(sum1);
    	//System.out.println(sum2);
    	System.out.println(Math.min(Math.min(sum1, sum2), sum3));
    }
}