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 ans1 = a*x + b*y;
		int ans2 = 2*c*Math.min(x, y);
		if(x>y)ans2 += (x-y)*a;
		else if(x<y)ans2 += (y-x)*b;
		int ans3 = 2*c*Math.max(x, y);
		System.out.println(Math.min(ans1, Math.min(ans2, ans3)));
	}

} 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 ans1 = a*x + b*y;
		int ans2 = 2*c*Math.min(x, y);
		if(x>y)ans2 += (x-y)*a;
		else if(x<y)ans2 += (y-x)*b;
		int ans3 = 2*c*Math.max(x, y);
		System.out.println(Math.min(ans1, Math.min(ans2, ans3)));
	}

} 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 ans1 = a*x + b*y;
		int ans2 = 2*c*Math.min(x, y);
		if(x>y)ans2 += (x-y)*a;
		else if(x<y)ans2 += (y-x)*b;
		int ans3 = 2*c*Math.max(x, y);
		System.out.println(Math.min(ans1, Math.min(ans2, ans3)));
	} 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 ans1 = a*x + b*y;
		int ans2 = 2*c*Math.min(x, y);
		if(x>y)ans2 += (x-y)*a;
		else if(x<y)ans2 += (y-x)*b;
		int ans3 = 2*c*Math.max(x, y);
		System.out.println(Math.min(ans1, Math.min(ans2, ans3)));
	} 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 ans1 = a*x + b*y; ans1 a*x + b*y a*x a x b*y b y int ans2 = 2*c*Math.min(x, y); ans2 2*c*Math.min(x, y) 2*c*Math.min(x, y) 2 c Math.min(x, y) Math.min Math x y if(x>y)ans2 += (x-y)*a;
		else if(x<y)ans2 += (y-x)*b; x>y x y ans2 += (x-y)*a ans2 (x-y)*a (x-y) x y a if(x<y)ans2 += (y-x)*b; x<y x y ans2 += (y-x)*b ans2 (y-x)*b (y-x) y x b int ans3 = 2*c*Math.max(x, y); ans3 2*c*Math.max(x, y) 2*c*Math.max(x, y) 2 c Math.max(x, y) Math.max Math x y System.out.println(Math.min(ans1, Math.min(ans2, ans3))) System.out.println System.out System System.out Math.min(ans1, Math.min(ans2, ans3)) Math.min Math ans1 Math.min(ans2, ans3) Math.min Math ans2 ans3 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 ans1 = a*x + b*y;
		int ans2 = 2*c*Math.min(x, y);
		if(x>y)ans2 += (x-y)*a;
		else if(x<y)ans2 += (y-x)*b;
		int ans3 = 2*c*Math.max(x, y);
		System.out.println(Math.min(ans1, Math.min(ans2, ans3)));
	}

} 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 ans1 = a*x + b*y;
		int ans2 = 2*c*Math.min(x, y);
		if(x>y)ans2 += (x-y)*a;
		else if(x<y)ans2 += (y-x)*b;
		int ans3 = 2*c*Math.max(x, y);
		System.out.println(Math.min(ans1, Math.min(ans2, ans3)));
	}

} 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 ans1 = a*x + b*y;
		int ans2 = 2*c*Math.min(x, y);
		if(x>y)ans2 += (x-y)*a;
		else if(x<y)ans2 += (y-x)*b;
		int ans3 = 2*c*Math.max(x, y);
		System.out.println(Math.min(ans1, Math.min(ans2, ans3)));
	}

}
