import java.util.Scanner;
 
public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		int Y = Integer.parseInt(sc.next());
		sc.close();
 
		int cost = Integer.MAX_VALUE;
		//全探索
		for(int i = 0; i <= Math.pow(10, 5); i++) {
			int tmpCost = i * 2 * C + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
			if(tmpCost < cost) cost = tmpCost;
		}
 
		System.out.println(cost);
	}
 
} import java.util.Scanner; Scanner java.util public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		int Y = Integer.parseInt(sc.next());
		sc.close();
 
		int cost = Integer.MAX_VALUE;
		//全探索
		for(int i = 0; i <= Math.pow(10, 5); i++) {
			int tmpCost = i * 2 * C + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
			if(tmpCost < cost) cost = tmpCost;
		}
 
		System.out.println(cost);
	}
 
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		int Y = Integer.parseInt(sc.next());
		sc.close();
 
		int cost = Integer.MAX_VALUE;
		//全探索
		for(int i = 0; i <= Math.pow(10, 5); i++) {
			int tmpCost = i * 2 * C + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
			if(tmpCost < cost) cost = tmpCost;
		}
 
		System.out.println(cost);
	} main {
		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		int Y = Integer.parseInt(sc.next());
		sc.close();
 
		int cost = Integer.MAX_VALUE;
		//全探索
		for(int i = 0; i <= Math.pow(10, 5); i++) {
			int tmpCost = i * 2 * C + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
			if(tmpCost < cost) cost = tmpCost;
		}
 
		System.out.println(cost);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = Integer.parseInt(sc.next()); A Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int B = Integer.parseInt(sc.next()); B Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int C = Integer.parseInt(sc.next()); C Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int X = Integer.parseInt(sc.next()); X Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int Y = Integer.parseInt(sc.next()); Y Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc int cost = Integer.MAX_VALUE; cost Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i = 0; i <= Math.pow(10, 5); i++) {
			int tmpCost = i * 2 * C + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
			if(tmpCost < cost) cost = tmpCost;
		} int i = 0; int i = 0; i 0 i <= Math.pow(10, 5) i Math.pow(10, 5) Math.pow Math 10 5 i++ i++ i {
			int tmpCost = i * 2 * C + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
			if(tmpCost < cost) cost = tmpCost;
		} {
			int tmpCost = i * 2 * C + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
			if(tmpCost < cost) cost = tmpCost;
		} int tmpCost = i * 2 * C + Math.max(0, X - i) * A + Math.max(0, Y - i) * B; tmpCost i * 2 * C + Math.max(0, X - i) * A + Math.max(0, Y - i) * B i * 2 * C + Math.max(0, X - i) * A + Math.max(0, Y - i) * B i * 2 * C i * 2 * C i 2 C Math.max(0, X - i) * A Math.max(0, X - i) Math.max Math 0 X - i X i A Math.max(0, Y - i) * B Math.max(0, Y - i) Math.max Math 0 Y - i Y i B if(tmpCost < cost) cost = tmpCost; tmpCost < cost tmpCost cost cost = tmpCost cost tmpCost 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 = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		int Y = Integer.parseInt(sc.next());
		sc.close();
 
		int cost = Integer.MAX_VALUE;
		//全探索
		for(int i = 0; i <= Math.pow(10, 5); i++) {
			int tmpCost = i * 2 * C + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
			if(tmpCost < cost) cost = tmpCost;
		}
 
		System.out.println(cost);
	}
 
} public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		int Y = Integer.parseInt(sc.next());
		sc.close();
 
		int cost = Integer.MAX_VALUE;
		//全探索
		for(int i = 0; i <= Math.pow(10, 5); i++) {
			int tmpCost = i * 2 * C + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
			if(tmpCost < cost) cost = tmpCost;
		}
 
		System.out.println(cost);
	}
 
} Main
import java.util.Scanner;
 
public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		int Y = Integer.parseInt(sc.next());
		sc.close();
 
		int cost = Integer.MAX_VALUE;
		//全探索
		for(int i = 0; i <= Math.pow(10, 5); i++) {
			int tmpCost = i * 2 * C + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
			if(tmpCost < cost) cost = tmpCost;
		}
 
		System.out.println(cost);
	}
 
}