import 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 cost = a * x + b * y;
		if (x > y) {
		    cost = Math.min(cost, c * y * 2 + (x - y) * a);
		    cost = Math.min(cost, c * x * 2);
		} else {
		    cost = Math.min(cost, c * x * 2 + (y - x) * b);
		    cost = Math.min(cost, c * y * 2);
		}
		System.out.println(cost);
	}
} import java.util.*; util.* java 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 cost = a * x + b * y;
		if (x > y) {
		    cost = Math.min(cost, c * y * 2 + (x - y) * a);
		    cost = Math.min(cost, c * x * 2);
		} else {
		    cost = Math.min(cost, c * x * 2 + (y - x) * b);
		    cost = Math.min(cost, c * y * 2);
		}
		System.out.println(cost);
	}
} 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 cost = a * x + b * y;
		if (x > y) {
		    cost = Math.min(cost, c * y * 2 + (x - y) * a);
		    cost = Math.min(cost, c * x * 2);
		} else {
		    cost = Math.min(cost, c * x * 2 + (y - x) * b);
		    cost = Math.min(cost, c * y * 2);
		}
		System.out.println(cost);
	} 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 cost = a * x + b * y;
		if (x > y) {
		    cost = Math.min(cost, c * y * 2 + (x - y) * a);
		    cost = Math.min(cost, c * x * 2);
		} else {
		    cost = Math.min(cost, c * x * 2 + (y - x) * b);
		    cost = Math.min(cost, c * y * 2);
		}
		System.out.println(cost);
	} 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 cost = a * x + b * y; cost a * x + b * y a * x a x b * y b y if (x > y) {
		    cost = Math.min(cost, c * y * 2 + (x - y) * a);
		    cost = Math.min(cost, c * x * 2);
		} else {
		    cost = Math.min(cost, c * x * 2 + (y - x) * b);
		    cost = Math.min(cost, c * y * 2);
		} x > y x y {
		    cost = Math.min(cost, c * y * 2 + (x - y) * a);
		    cost = Math.min(cost, c * x * 2);
		} cost = Math.min(cost, c * y * 2 + (x - y) * a) cost Math.min(cost, c * y * 2 + (x - y) * a) Math.min Math cost c * y * 2 + (x - y) * a c * y * 2 c * y * 2 c y 2 (x - y) * a (x - y) x y a cost = Math.min(cost, c * x * 2) cost Math.min(cost, c * x * 2) Math.min Math cost c * x * 2 c * x * 2 c x 2 {
		    cost = Math.min(cost, c * x * 2 + (y - x) * b);
		    cost = Math.min(cost, c * y * 2);
		} cost = Math.min(cost, c * x * 2 + (y - x) * b) cost Math.min(cost, c * x * 2 + (y - x) * b) Math.min Math cost c * x * 2 + (y - x) * b c * x * 2 c * x * 2 c x 2 (y - x) * b (y - x) y x b cost = Math.min(cost, c * y * 2) cost Math.min(cost, c * y * 2) Math.min Math cost c * y * 2 c * y * 2 c y 2 System.out.println(cost) System.out.println System.out System System.out cost 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 cost = a * x + b * y;
		if (x > y) {
		    cost = Math.min(cost, c * y * 2 + (x - y) * a);
		    cost = Math.min(cost, c * x * 2);
		} else {
		    cost = Math.min(cost, c * x * 2 + (y - x) * b);
		    cost = Math.min(cost, c * y * 2);
		}
		System.out.println(cost);
	}
} 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 cost = a * x + b * y;
		if (x > y) {
		    cost = Math.min(cost, c * y * 2 + (x - y) * a);
		    cost = Math.min(cost, c * x * 2);
		} else {
		    cost = Math.min(cost, c * x * 2 + (y - x) * b);
		    cost = Math.min(cost, c * y * 2);
		}
		System.out.println(cost);
	}
} Main
import 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 cost = a * x + b * y;
		if (x > y) {
		    cost = Math.min(cost, c * y * 2 + (x - y) * a);
		    cost = Math.min(cost, c * x * 2);
		} else {
		    cost = Math.min(cost, c * x * 2 + (y - x) * b);
		    cost = Math.min(cost, c * y * 2);
		}
		System.out.println(cost);
	}
}
