import java.util.Scanner;

public class Main {

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

	}

} import java.util.Scanner; Scanner java.util public class Main {

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

	}

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

	} main {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt();
		int c = in.nextInt();
		int x = in.nextInt();
		int y = in.nextInt();
		
		if(a+b<=c*2) {
			System.out.println(a*x+b*y);
		}else {
			if(x<y) {
				int ans = Math.min(2*c*x+b*(y-x), 2*c*y);
				System.out.println(ans);
			}else {
				int ans = Math.min(2*c*y+a*(x-y), 2*c*x);
				System.out.println(ans);
			}
		}
		
		in.close();

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

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

	}

} public class Main {

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

	}

} Main
import java.util.Scanner;

public class Main {

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

	}

}
