import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A,B,C,X,Y;
		A = sc.nextInt();
		B = sc.nextInt();
		C = sc.nextInt();
		X = sc.nextInt();
		Y = sc.nextInt();
		int min =A*X+B*Y;
		if (X>Y) {
			if (C*2*X<min) {
				min = C*2*X;
			}
			if (C*2*Y+(X-Y)*A<min) {
				min =C*2*Y+(X-Y)*A;
			}
		} else {
			if (C*2*Y<min) {
				min = C*2*Y;
			}
			if (C*2*X+(Y-X)*B<min) {
				min =C*2*X+(Y-X)*B;
			}
		}
		System.out.println(min);
	}
} import java.util.Scanner; Scanner java.util public class Main {

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A,B,C,X,Y;
		A = sc.nextInt();
		B = sc.nextInt();
		C = sc.nextInt();
		X = sc.nextInt();
		Y = sc.nextInt();
		int min =A*X+B*Y;
		if (X>Y) {
			if (C*2*X<min) {
				min = C*2*X;
			}
			if (C*2*Y+(X-Y)*A<min) {
				min =C*2*Y+(X-Y)*A;
			}
		} else {
			if (C*2*Y<min) {
				min = C*2*Y;
			}
			if (C*2*X+(Y-X)*B<min) {
				min =C*2*X+(Y-X)*B;
			}
		}
		System.out.println(min);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A,B,C,X,Y;
		A = sc.nextInt();
		B = sc.nextInt();
		C = sc.nextInt();
		X = sc.nextInt();
		Y = sc.nextInt();
		int min =A*X+B*Y;
		if (X>Y) {
			if (C*2*X<min) {
				min = C*2*X;
			}
			if (C*2*Y+(X-Y)*A<min) {
				min =C*2*Y+(X-Y)*A;
			}
		} else {
			if (C*2*Y<min) {
				min = C*2*Y;
			}
			if (C*2*X+(Y-X)*B<min) {
				min =C*2*X+(Y-X)*B;
			}
		}
		System.out.println(min);
	}
}