import java.util.Scanner;

class Main {
	public static void main(String[] $) {
		Scanner sc = new Scanner(System.in);
		long a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
		long res1=a*x+b*y,res2=Math.max(x, y)*c*2,res3=Long.MAX_VALUE;
		if(x>y) {
			res3=y*c*2+(x-y)*a;
		}else if(x<y) {
			res3=x*c*2+(y-x)*b;
		}
		System.out.println((long)Math.min(res1, Math.min(res2, res3)));
	}
}
 import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] $) {
		Scanner sc = new Scanner(System.in);
		long a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
		long res1=a*x+b*y,res2=Math.max(x, y)*c*2,res3=Long.MAX_VALUE;
		if(x>y) {
			res3=y*c*2+(x-y)*a;
		}else if(x<y) {
			res3=x*c*2+(y-x)*b;
		}
		System.out.println((long)Math.min(res1, Math.min(res2, res3)));
	}
} Main public static void main(String[] $) {
		Scanner sc = new Scanner(System.in);
		long a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
		long res1=a*x+b*y,res2=Math.max(x, y)*c*2,res3=Long.MAX_VALUE;
		if(x>y) {
			res3=y*c*2+(x-y)*a;
		}else if(x<y) {
			res3=x*c*2+(y-x)*b;
		}
		System.out.println((long)Math.min(res1, Math.min(res2, res3)));
	} main {
		Scanner sc = new Scanner(System.in);
		long a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
		long res1=a*x+b*y,res2=Math.max(x, y)*c*2,res3=Long.MAX_VALUE;
		if(x>y) {
			res3=y*c*2+(x-y)*a;
		}else if(x<y) {
			res3=x*c*2+(y-x)*b;
		}
		System.out.println((long)Math.min(res1, Math.min(res2, res3)));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a=sc.nextInt() a sc.nextInt() sc.nextInt sc b=sc.nextInt() b sc.nextInt() sc.nextInt sc c=sc.nextInt() c sc.nextInt() sc.nextInt sc x=sc.nextInt() x sc.nextInt() sc.nextInt sc y=sc.nextInt(); y sc.nextInt() sc.nextInt sc long res1=a*x+b*y res1 a*x+b*y a*x a x b*y b y res2=Math.max(x, y)*c*2 res2 Math.max(x, y)*c*2 Math.max(x, y)*c*2 Math.max(x, y) Math.max Math x y c 2 res3=Long.MAX_VALUE; res3 Long.MAX_VALUE Long Long.MAX_VALUE if(x>y) {
			res3=y*c*2+(x-y)*a;
		}else if(x<y) {
			res3=x*c*2+(y-x)*b;
		} x>y x y {
			res3=y*c*2+(x-y)*a;
		} res3=y*c*2+(x-y)*a res3 y*c*2+(x-y)*a y*c*2 y*c*2 y c 2 (x-y)*a (x-y) x y a if(x<y) {
			res3=x*c*2+(y-x)*b;
		} x<y x y {
			res3=x*c*2+(y-x)*b;
		} res3=x*c*2+(y-x)*b res3 x*c*2+(y-x)*b x*c*2 x*c*2 x c 2 (y-x)*b (y-x) y x b System.out.println((long)Math.min(res1, Math.min(res2, res3))) System.out.println System.out System System.out (long)Math.min(res1, Math.min(res2, res3)) Math.min Math res1 Math.min(res2, res3) Math.min Math res2 res3 String[] $ $
import java.util.Scanner;

class Main {
	public static void main(String[] $) {
		Scanner sc = new Scanner(System.in);
		long a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
		long res1=a*x+b*y,res2=Math.max(x, y)*c*2,res3=Long.MAX_VALUE;
		if(x>y) {
			res3=y*c*2+(x-y)*a;
		}else if(x<y) {
			res3=x*c*2+(y-x)*b;
		}
		System.out.println((long)Math.min(res1, Math.min(res2, res3)));
	}
}

