import java.util.Scanner;

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 betu = (a * x) + (b * y);
		int sepa = c * Math.max(x, y) * 2;
		int midd;
		if (x > y) {
			midd = (c * y * 2) + a * (x - y);
		} else if (x < y) {
			midd = (c * x * 2) + b * (y - x);
		} else {
			midd = sepa;
		}
		System.out.println(Math.min(Math.min(betu, sepa), midd));
	}
} import java.util.Scanner; Scanner java.util 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 betu = (a * x) + (b * y);
		int sepa = c * Math.max(x, y) * 2;
		int midd;
		if (x > y) {
			midd = (c * y * 2) + a * (x - y);
		} else if (x < y) {
			midd = (c * x * 2) + b * (y - x);
		} else {
			midd = sepa;
		}
		System.out.println(Math.min(Math.min(betu, sepa), midd));
	}
} 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 betu = (a * x) + (b * y);
		int sepa = c * Math.max(x, y) * 2;
		int midd;
		if (x > y) {
			midd = (c * y * 2) + a * (x - y);
		} else if (x < y) {
			midd = (c * x * 2) + b * (y - x);
		} else {
			midd = sepa;
		}
		System.out.println(Math.min(Math.min(betu, sepa), midd));
	} 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 betu = (a * x) + (b * y);
		int sepa = c * Math.max(x, y) * 2;
		int midd;
		if (x > y) {
			midd = (c * y * 2) + a * (x - y);
		} else if (x < y) {
			midd = (c * x * 2) + b * (y - x);
		} else {
			midd = sepa;
		}
		System.out.println(Math.min(Math.min(betu, sepa), midd));
	} 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 betu = (a * x) + (b * y); betu (a * x) + (b * y) (a * x) a x (b * y) b y int sepa = c * Math.max(x, y) * 2; sepa c * Math.max(x, y) * 2 c * Math.max(x, y) * 2 c Math.max(x, y) Math.max Math x y 2 int midd; midd if (x > y) {
			midd = (c * y * 2) + a * (x - y);
		} else if (x < y) {
			midd = (c * x * 2) + b * (y - x);
		} else {
			midd = sepa;
		} x > y x y {
			midd = (c * y * 2) + a * (x - y);
		} midd = (c * y * 2) + a * (x - y) midd (c * y * 2) + a * (x - y) (c * y * 2) c * y * 2 c y 2 a * (x - y) a (x - y) x y if (x < y) {
			midd = (c * x * 2) + b * (y - x);
		} else {
			midd = sepa;
		} x < y x y {
			midd = (c * x * 2) + b * (y - x);
		} midd = (c * x * 2) + b * (y - x) midd (c * x * 2) + b * (y - x) (c * x * 2) c * x * 2 c x 2 b * (y - x) b (y - x) y x {
			midd = sepa;
		} midd = sepa midd sepa System.out.println(Math.min(Math.min(betu, sepa), midd)) System.out.println System.out System System.out Math.min(Math.min(betu, sepa), midd) Math.min Math Math.min(betu, sepa) Math.min Math betu sepa midd String[] args args
import java.util.Scanner;

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