import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		sc.close();
		long ans = 0;
		if(a + b <= c * 2) {
			ans = (long)x * a + (long)y * b;
		}
		else {
			if(x>=y) {
				ans = (long)y * 2 * c + (long)(x - y) * Math.min(2*c,a);
			}
			else {
				ans = (long)x * 2 * c + (long)(y - x) * Math.min(2*c,b);				
			}
		}
		System.out.println(ans);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		sc.close();
		long ans = 0;
		if(a + b <= c * 2) {
			ans = (long)x * a + (long)y * b;
		}
		else {
			if(x>=y) {
				ans = (long)y * 2 * c + (long)(x - y) * Math.min(2*c,a);
			}
			else {
				ans = (long)x * 2 * c + (long)(y - x) * Math.min(2*c,b);				
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		sc.close();
		long ans = 0;
		if(a + b <= c * 2) {
			ans = (long)x * a + (long)y * b;
		}
		else {
			if(x>=y) {
				ans = (long)y * 2 * c + (long)(x - y) * Math.min(2*c,a);
			}
			else {
				ans = (long)x * 2 * c + (long)(y - x) * Math.min(2*c,b);				
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		sc.close();
		long ans = 0;
		if(a + b <= c * 2) {
			ans = (long)x * a + (long)y * b;
		}
		else {
			if(x>=y) {
				ans = (long)y * 2 * c + (long)(x - y) * Math.min(2*c,a);
			}
			else {
				ans = (long)x * 2 * c + (long)(y - x) * Math.min(2*c,b);				
			}
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt(); y sc.nextInt() sc.nextInt sc sc.close() sc.close sc long ans = 0; ans 0 if(a + b <= c * 2) {
			ans = (long)x * a + (long)y * b;
		}
		else {
			if(x>=y) {
				ans = (long)y * 2 * c + (long)(x - y) * Math.min(2*c,a);
			}
			else {
				ans = (long)x * 2 * c + (long)(y - x) * Math.min(2*c,b);				
			}
		} a + b <= c * 2 a + b a b c * 2 c 2 {
			ans = (long)x * a + (long)y * b;
		} ans = (long)x * a + (long)y * b ans (long)x * a + (long)y * b (long)x * a (long)x a (long)y * b (long)y b {
			if(x>=y) {
				ans = (long)y * 2 * c + (long)(x - y) * Math.min(2*c,a);
			}
			else {
				ans = (long)x * 2 * c + (long)(y - x) * Math.min(2*c,b);				
			}
		} if(x>=y) {
				ans = (long)y * 2 * c + (long)(x - y) * Math.min(2*c,a);
			}
			else {
				ans = (long)x * 2 * c + (long)(y - x) * Math.min(2*c,b);				
			} x>=y x y {
				ans = (long)y * 2 * c + (long)(x - y) * Math.min(2*c,a);
			} ans = (long)y * 2 * c + (long)(x - y) * Math.min(2*c,a) ans (long)y * 2 * c + (long)(x - y) * Math.min(2*c,a) (long)y * 2 * c (long)y * 2 * c (long)y 2 c (long)(x - y) * Math.min(2*c,a) (long)(x - y) x y Math.min(2*c,a) Math.min Math 2*c 2 c a {
				ans = (long)x * 2 * c + (long)(y - x) * Math.min(2*c,b);				
			} ans = (long)x * 2 * c + (long)(y - x) * Math.min(2*c,b) ans (long)x * 2 * c + (long)(y - x) * Math.min(2*c,b) (long)x * 2 * c (long)x * 2 * c (long)x 2 c (long)(y - x) * Math.min(2*c,b) (long)(y - x) y x Math.min(2*c,b) Math.min Math 2*c 2 c b System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		sc.close();
		long ans = 0;
		if(a + b <= c * 2) {
			ans = (long)x * a + (long)y * b;
		}
		else {
			if(x>=y) {
				ans = (long)y * 2 * c + (long)(x - y) * Math.min(2*c,a);
			}
			else {
				ans = (long)x * 2 * c + (long)(y - x) * Math.min(2*c,b);				
			}
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		sc.close();
		long ans = 0;
		if(a + b <= c * 2) {
			ans = (long)x * a + (long)y * b;
		}
		else {
			if(x>=y) {
				ans = (long)y * 2 * c + (long)(x - y) * Math.min(2*c,a);
			}
			else {
				ans = (long)x * 2 * c + (long)(y - x) * Math.min(2*c,b);				
			}
		}
		System.out.println(ans);
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		sc.close();
		long ans = 0;
		if(a + b <= c * 2) {
			ans = (long)x * a + (long)y * b;
		}
		else {
			if(x>=y) {
				ans = (long)y * 2 * c + (long)(x - y) * Math.min(2*c,a);
			}
			else {
				ans = (long)x * 2 * c + (long)(y - x) * Math.min(2*c,b);				
			}
		}
		System.out.println(ans);
	}
}