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