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

		int[] data = new int[3];
		if (X >= Y) {
			data[0] = (C * Y * 2) + (A * (X - Y));
			data[1] = C * X * 2;
		} else {
			data[0] = (C * X * 2) + (B * (Y - X));
			data[1] = C * Y * 2;
		}
		data[2] = A * X + B * Y;

		int min = data[0];
		for (int i = 1; i < 3; i++) {
			if (min > data[i])
				min = data[i];
		}
		System.out.println(min);

		sc.close();

	}

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

		int[] data = new int[3];
		if (X >= Y) {
			data[0] = (C * Y * 2) + (A * (X - Y));
			data[1] = C * X * 2;
		} else {
			data[0] = (C * X * 2) + (B * (Y - X));
			data[1] = C * Y * 2;
		}
		data[2] = A * X + B * Y;

		int min = data[0];
		for (int i = 1; i < 3; i++) {
			if (min > data[i])
				min = data[i];
		}
		System.out.println(min);

		sc.close();

	}

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

		int[] data = new int[3];
		if (X >= Y) {
			data[0] = (C * Y * 2) + (A * (X - Y));
			data[1] = C * X * 2;
		} else {
			data[0] = (C * X * 2) + (B * (Y - X));
			data[1] = C * Y * 2;
		}
		data[2] = A * X + B * Y;

		int min = data[0];
		for (int i = 1; i < 3; i++) {
			if (min > data[i])
				min = data[i];
		}
		System.out.println(min);

		sc.close();

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

		int[] data = new int[3];
		if (X >= Y) {
			data[0] = (C * Y * 2) + (A * (X - Y));
			data[1] = C * X * 2;
		} else {
			data[0] = (C * X * 2) + (B * (Y - X));
			data[1] = C * Y * 2;
		}
		data[2] = A * X + B * Y;

		int min = data[0];
		for (int i = 1; i < 3; i++) {
			if (min > data[i])
				min = data[i];
		}
		System.out.println(min);

		sc.close();

	} 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 int[] data = new int[3]; data new int[3] 3 if (X >= Y) {
			data[0] = (C * Y * 2) + (A * (X - Y));
			data[1] = C * X * 2;
		} else {
			data[0] = (C * X * 2) + (B * (Y - X));
			data[1] = C * Y * 2;
		} X >= Y X Y {
			data[0] = (C * Y * 2) + (A * (X - Y));
			data[1] = C * X * 2;
		} data[0] = (C * Y * 2) + (A * (X - Y)) data[0] data 0 (C * Y * 2) + (A * (X - Y)) (C * Y * 2) C * Y * 2 C Y 2 (A * (X - Y)) A (X - Y) X Y data[1] = C * X * 2 data[1] data 1 C * X * 2 C * X * 2 C X 2 {
			data[0] = (C * X * 2) + (B * (Y - X));
			data[1] = C * Y * 2;
		} data[0] = (C * X * 2) + (B * (Y - X)) data[0] data 0 (C * X * 2) + (B * (Y - X)) (C * X * 2) C * X * 2 C X 2 (B * (Y - X)) B (Y - X) Y X data[1] = C * Y * 2 data[1] data 1 C * Y * 2 C * Y * 2 C Y 2 data[2] = A * X + B * Y data[2] data 2 A * X + B * Y A * X A X B * Y B Y int min = data[0]; min data[0] data 0 for (int i = 1; i < 3; i++) {
			if (min > data[i])
				min = data[i];
		} int i = 1; int i = 1; i 1 i < 3 i 3 i++ i++ i {
			if (min > data[i])
				min = data[i];
		} {
			if (min > data[i])
				min = data[i];
		} if (min > data[i])
				min = data[i]; min > data[i] min data[i] data i min = data[i] min data[i] data i System.out.println(min) System.out.println System.out System System.out min sc.close() sc.close sc 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();

		int[] data = new int[3];
		if (X >= Y) {
			data[0] = (C * Y * 2) + (A * (X - Y));
			data[1] = C * X * 2;
		} else {
			data[0] = (C * X * 2) + (B * (Y - X));
			data[1] = C * Y * 2;
		}
		data[2] = A * X + B * Y;

		int min = data[0];
		for (int i = 1; i < 3; i++) {
			if (min > data[i])
				min = data[i];
		}
		System.out.println(min);

		sc.close();

	}

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

		int[] data = new int[3];
		if (X >= Y) {
			data[0] = (C * Y * 2) + (A * (X - Y));
			data[1] = C * X * 2;
		} else {
			data[0] = (C * X * 2) + (B * (Y - X));
			data[1] = C * Y * 2;
		}
		data[2] = A * X + B * Y;

		int min = data[0];
		for (int i = 1; i < 3; i++) {
			if (min > data[i])
				min = data[i];
		}
		System.out.println(min);

		sc.close();

	}

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

		int[] data = new int[3];
		if (X >= Y) {
			data[0] = (C * Y * 2) + (A * (X - Y));
			data[1] = C * X * 2;
		} else {
			data[0] = (C * X * 2) + (B * (Y - X));
			data[1] = C * Y * 2;
		}
		data[2] = A * X + B * Y;

		int min = data[0];
		for (int i = 1; i < 3; i++) {
			if (min > data[i])
				min = data[i];
		}
		System.out.println(min);

		sc.close();

	}

}