import java.util.Scanner;
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();

		if((A+B)<=C*2){
			System.out.println(A*X+B*Y);
			return;
		}
		if(X>=Y){
			int volume = 0;
			X -= Y;
			volume += C*Y*2;
			if(A<C*2){
				volume += X*A;
				System.out.println(volume);
			}else{
				volume += C*2*X;
				System.out.println(volume);
			}
		}else{
			int volume = 0;
			Y -= X;
			volume += C*X*2;
			if(B<C*2){
				volume += Y*B;
				System.out.println(volume);
			}else{
				volume += C*2*Y;
				System.out.println(volume);
			}
		}

	}

} import java.util.Scanner; Scanner 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();

		if((A+B)<=C*2){
			System.out.println(A*X+B*Y);
			return;
		}
		if(X>=Y){
			int volume = 0;
			X -= Y;
			volume += C*Y*2;
			if(A<C*2){
				volume += X*A;
				System.out.println(volume);
			}else{
				volume += C*2*X;
				System.out.println(volume);
			}
		}else{
			int volume = 0;
			Y -= X;
			volume += C*X*2;
			if(B<C*2){
				volume += Y*B;
				System.out.println(volume);
			}else{
				volume += C*2*Y;
				System.out.println(volume);
			}
		}

	}

} 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();

		if((A+B)<=C*2){
			System.out.println(A*X+B*Y);
			return;
		}
		if(X>=Y){
			int volume = 0;
			X -= Y;
			volume += C*Y*2;
			if(A<C*2){
				volume += X*A;
				System.out.println(volume);
			}else{
				volume += C*2*X;
				System.out.println(volume);
			}
		}else{
			int volume = 0;
			Y -= X;
			volume += C*X*2;
			if(B<C*2){
				volume += Y*B;
				System.out.println(volume);
			}else{
				volume += C*2*Y;
				System.out.println(volume);
			}
		}

	} 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();

		if((A+B)<=C*2){
			System.out.println(A*X+B*Y);
			return;
		}
		if(X>=Y){
			int volume = 0;
			X -= Y;
			volume += C*Y*2;
			if(A<C*2){
				volume += X*A;
				System.out.println(volume);
			}else{
				volume += C*2*X;
				System.out.println(volume);
			}
		}else{
			int volume = 0;
			Y -= X;
			volume += C*X*2;
			if(B<C*2){
				volume += Y*B;
				System.out.println(volume);
			}else{
				volume += C*2*Y;
				System.out.println(volume);
			}
		}

	} 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 if((A+B)<=C*2){
			System.out.println(A*X+B*Y);
			return;
		} (A+B)<=C*2 (A+B) A B C*2 C 2 {
			System.out.println(A*X+B*Y);
			return;
		} 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 return; if(X>=Y){
			int volume = 0;
			X -= Y;
			volume += C*Y*2;
			if(A<C*2){
				volume += X*A;
				System.out.println(volume);
			}else{
				volume += C*2*X;
				System.out.println(volume);
			}
		}else{
			int volume = 0;
			Y -= X;
			volume += C*X*2;
			if(B<C*2){
				volume += Y*B;
				System.out.println(volume);
			}else{
				volume += C*2*Y;
				System.out.println(volume);
			}
		} X>=Y X Y {
			int volume = 0;
			X -= Y;
			volume += C*Y*2;
			if(A<C*2){
				volume += X*A;
				System.out.println(volume);
			}else{
				volume += C*2*X;
				System.out.println(volume);
			}
		} int volume = 0; volume 0 X -= Y X Y volume += C*Y*2 volume C*Y*2 C*Y*2 C Y 2 if(A<C*2){
				volume += X*A;
				System.out.println(volume);
			}else{
				volume += C*2*X;
				System.out.println(volume);
			} A<C*2 A C*2 C 2 {
				volume += X*A;
				System.out.println(volume);
			} volume += X*A volume X*A X A System.out.println(volume) System.out.println System.out System System.out volume {
				volume += C*2*X;
				System.out.println(volume);
			} volume += C*2*X volume C*2*X C*2*X C 2 X System.out.println(volume) System.out.println System.out System System.out volume {
			int volume = 0;
			Y -= X;
			volume += C*X*2;
			if(B<C*2){
				volume += Y*B;
				System.out.println(volume);
			}else{
				volume += C*2*Y;
				System.out.println(volume);
			}
		} int volume = 0; volume 0 Y -= X Y X volume += C*X*2 volume C*X*2 C*X*2 C X 2 if(B<C*2){
				volume += Y*B;
				System.out.println(volume);
			}else{
				volume += C*2*Y;
				System.out.println(volume);
			} B<C*2 B C*2 C 2 {
				volume += Y*B;
				System.out.println(volume);
			} volume += Y*B volume Y*B Y B System.out.println(volume) System.out.println System.out System System.out volume {
				volume += C*2*Y;
				System.out.println(volume);
			} volume += C*2*Y volume C*2*Y C*2*Y C 2 Y System.out.println(volume) System.out.println System.out System System.out volume 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();

		if((A+B)<=C*2){
			System.out.println(A*X+B*Y);
			return;
		}
		if(X>=Y){
			int volume = 0;
			X -= Y;
			volume += C*Y*2;
			if(A<C*2){
				volume += X*A;
				System.out.println(volume);
			}else{
				volume += C*2*X;
				System.out.println(volume);
			}
		}else{
			int volume = 0;
			Y -= X;
			volume += C*X*2;
			if(B<C*2){
				volume += Y*B;
				System.out.println(volume);
			}else{
				volume += C*2*Y;
				System.out.println(volume);
			}
		}

	}

} 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();

		if((A+B)<=C*2){
			System.out.println(A*X+B*Y);
			return;
		}
		if(X>=Y){
			int volume = 0;
			X -= Y;
			volume += C*Y*2;
			if(A<C*2){
				volume += X*A;
				System.out.println(volume);
			}else{
				volume += C*2*X;
				System.out.println(volume);
			}
		}else{
			int volume = 0;
			Y -= X;
			volume += C*X*2;
			if(B<C*2){
				volume += Y*B;
				System.out.println(volume);
			}else{
				volume += C*2*Y;
				System.out.println(volume);
			}
		}

	}

} Main
import java.util.Scanner;
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();

		if((A+B)<=C*2){
			System.out.println(A*X+B*Y);
			return;
		}
		if(X>=Y){
			int volume = 0;
			X -= Y;
			volume += C*Y*2;
			if(A<C*2){
				volume += X*A;
				System.out.println(volume);
			}else{
				volume += C*2*X;
				System.out.println(volume);
			}
		}else{
			int volume = 0;
			Y -= X;
			volume += C*X*2;
			if(B<C*2){
				volume += Y*B;
				System.out.println(volume);
			}else{
				volume += C*2*Y;
				System.out.println(volume);
			}
		}

	}

}
