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 direct = x*a+y*b;
		int A = 0;
		int B = 0;
		int indirect = 0;
		if(x>y) {
			A = 2*y*c+(x-y)*a;
			indirect = Math.min(A, 2*x*c);
		}else {//
			B = 2*x*c+(y-x)*b;
			indirect = Math.min(B, 2*y*c);
		}	
		System.out.println(Math.min(direct, indirect));
	}
} 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 direct = x*a+y*b;
		int A = 0;
		int B = 0;
		int indirect = 0;
		if(x>y) {
			A = 2*y*c+(x-y)*a;
			indirect = Math.min(A, 2*x*c);
		}else {//
			B = 2*x*c+(y-x)*b;
			indirect = Math.min(B, 2*y*c);
		}	
		System.out.println(Math.min(direct, indirect));
	}
} 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 direct = x*a+y*b;
		int A = 0;
		int B = 0;
		int indirect = 0;
		if(x>y) {
			A = 2*y*c+(x-y)*a;
			indirect = Math.min(A, 2*x*c);
		}else {//
			B = 2*x*c+(y-x)*b;
			indirect = Math.min(B, 2*y*c);
		}	
		System.out.println(Math.min(direct, indirect));
	} 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 direct = x*a+y*b;
		int A = 0;
		int B = 0;
		int indirect = 0;
		if(x>y) {
			A = 2*y*c+(x-y)*a;
			indirect = Math.min(A, 2*x*c);
		}else {//
			B = 2*x*c+(y-x)*b;
			indirect = Math.min(B, 2*y*c);
		}	
		System.out.println(Math.min(direct, indirect));
	} 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 direct = x*a+y*b; direct x*a+y*b x*a x a y*b y b int A = 0; A 0 int B = 0; B 0 int indirect = 0; indirect 0 if(x>y) {
			A = 2*y*c+(x-y)*a;
			indirect = Math.min(A, 2*x*c);
		}else {//
			B = 2*x*c+(y-x)*b;
			indirect = Math.min(B, 2*y*c);
		} x>y x y {
			A = 2*y*c+(x-y)*a;
			indirect = Math.min(A, 2*x*c);
		} A = 2*y*c+(x-y)*a A 2*y*c+(x-y)*a 2*y*c 2*y*c 2 y c (x-y)*a (x-y) x y a indirect = Math.min(A, 2*x*c) indirect Math.min(A, 2*x*c) Math.min Math A 2*x*c 2*x*c 2 x c {//
			B = 2*x*c+(y-x)*b;
			indirect = Math.min(B, 2*y*c);
		} B = 2*x*c+(y-x)*b B 2*x*c+(y-x)*b 2*x*c 2*x*c 2 x c (y-x)*b (y-x) y x b indirect = Math.min(B, 2*y*c) indirect Math.min(B, 2*y*c) Math.min Math B 2*y*c 2*y*c 2 y c System.out.println(Math.min(direct, indirect)) System.out.println System.out System System.out Math.min(direct, indirect) Math.min Math direct indirect 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 direct = x*a+y*b;
		int A = 0;
		int B = 0;
		int indirect = 0;
		if(x>y) {
			A = 2*y*c+(x-y)*a;
			indirect = Math.min(A, 2*x*c);
		}else {//
			B = 2*x*c+(y-x)*b;
			indirect = Math.min(B, 2*y*c);
		}	
		System.out.println(Math.min(direct, indirect));
	}
} 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 direct = x*a+y*b;
		int A = 0;
		int B = 0;
		int indirect = 0;
		if(x>y) {
			A = 2*y*c+(x-y)*a;
			indirect = Math.min(A, 2*x*c);
		}else {//
			B = 2*x*c+(y-x)*b;
			indirect = Math.min(B, 2*y*c);
		}	
		System.out.println(Math.min(direct, indirect));
	}
} 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 direct = x*a+y*b;
		int A = 0;
		int B = 0;
		int indirect = 0;
		if(x>y) {
			A = 2*y*c+(x-y)*a;
			indirect = Math.min(A, 2*x*c);
		}else {//
			B = 2*x*c+(y-x)*b;
			indirect = Math.min(B, 2*y*c);
		}	
		System.out.println(Math.min(direct, indirect));
	}
}