import java.util.*;
public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt(), C = sc.nextInt(), X = sc.nextInt(), Y = sc.nextInt();
		int t1 = X*A+Y*B, t2=Math.min(2*C*Math.max(X,Y),  2*C*Math.min(X,Y)+((X>Y) ? (X-Y)*A : (Y-X)*B));
		System.out.println(Math.min(t1, t2));
		sc.close();			
	}

	public static void main(String args[]) {
		solve();
	}

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

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt(), C = sc.nextInt(), X = sc.nextInt(), Y = sc.nextInt();
		int t1 = X*A+Y*B, t2=Math.min(2*C*Math.max(X,Y),  2*C*Math.min(X,Y)+((X>Y) ? (X-Y)*A : (Y-X)*B));
		System.out.println(Math.min(t1, t2));
		sc.close();			
	}

	public static void main(String args[]) {
		solve();
	}

} Main static void solve() {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt(), C = sc.nextInt(), X = sc.nextInt(), Y = sc.nextInt();
		int t1 = X*A+Y*B, t2=Math.min(2*C*Math.max(X,Y),  2*C*Math.min(X,Y)+((X>Y) ? (X-Y)*A : (Y-X)*B));
		System.out.println(Math.min(t1, t2));
		sc.close();			
	} solve {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt(), C = sc.nextInt(), X = sc.nextInt(), Y = sc.nextInt();
		int t1 = X*A+Y*B, t2=Math.min(2*C*Math.max(X,Y),  2*C*Math.min(X,Y)+((X>Y) ? (X-Y)*A : (Y-X)*B));
		System.out.println(Math.min(t1, t2));
		sc.close();			
	} 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 X = sc.nextInt() X sc.nextInt() sc.nextInt sc Y = sc.nextInt(); Y sc.nextInt() sc.nextInt sc int t1 = X*A+Y*B t1 X*A+Y*B X*A X A Y*B Y B t2=Math.min(2*C*Math.max(X,Y),  2*C*Math.min(X,Y)+((X>Y) ? (X-Y)*A : (Y-X)*B)); t2 Math.min(2*C*Math.max(X,Y),  2*C*Math.min(X,Y)+((X>Y) ? (X-Y)*A : (Y-X)*B)) Math.min Math 2*C*Math.max(X,Y) 2*C*Math.max(X,Y) 2 C Math.max(X,Y) Math.max Math X Y 2*C*Math.min(X,Y)+((X>Y) ? (X-Y)*A : (Y-X)*B) 2*C*Math.min(X,Y) 2*C*Math.min(X,Y) 2 C Math.min(X,Y) Math.min Math X Y ((X>Y) ? (X-Y)*A : (Y-X)*B) (X>Y) X Y (X-Y)*A (X-Y) X Y A (Y-X)*B (Y-X) Y X B System.out.println(Math.min(t1, t2)) System.out.println System.out System System.out Math.min(t1, t2) Math.min Math t1 t2 sc.close() sc.close sc public static void main(String args[]) {
		solve();
	} main {
		solve();
	} solve() solve String args[] args public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt(), C = sc.nextInt(), X = sc.nextInt(), Y = sc.nextInt();
		int t1 = X*A+Y*B, t2=Math.min(2*C*Math.max(X,Y),  2*C*Math.min(X,Y)+((X>Y) ? (X-Y)*A : (Y-X)*B));
		System.out.println(Math.min(t1, t2));
		sc.close();			
	}

	public static void main(String args[]) {
		solve();
	}

} public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt(), C = sc.nextInt(), X = sc.nextInt(), Y = sc.nextInt();
		int t1 = X*A+Y*B, t2=Math.min(2*C*Math.max(X,Y),  2*C*Math.min(X,Y)+((X>Y) ? (X-Y)*A : (Y-X)*B));
		System.out.println(Math.min(t1, t2));
		sc.close();			
	}

	public static void main(String args[]) {
		solve();
	}

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

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt(), C = sc.nextInt(), X = sc.nextInt(), Y = sc.nextInt();
		int t1 = X*A+Y*B, t2=Math.min(2*C*Math.max(X,Y),  2*C*Math.min(X,Y)+((X>Y) ? (X-Y)*A : (Y-X)*B));
		System.out.println(Math.min(t1, t2));
		sc.close();			
	}

	public static void main(String args[]) {
		solve();
	}

}