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);
		} else {
			int ab = Math.min(x, y);
			System.out.println(Math.min((x - ab) * a + (y - ab) * b + c * ab * 2, c * Math.max(x, y) * 2));
		}

		sc.close();
	}
} 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);
		} else {
			int ab = Math.min(x, y);
			System.out.println(Math.min((x - ab) * a + (y - ab) * b + c * ab * 2, c * Math.max(x, y) * 2));
		}

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

		if (a + b < c * 2) {
			System.out.println(a * x + b * y);
		} else {
			int ab = Math.min(x, y);
			System.out.println(Math.min((x - ab) * a + (y - ab) * b + c * ab * 2, c * Math.max(x, y) * 2));
		}

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

		if (a + b < c * 2) {
			System.out.println(a * x + b * y);
		} else {
			int ab = Math.min(x, y);
			System.out.println(Math.min((x - ab) * a + (y - ab) * b + c * ab * 2, c * Math.max(x, y) * 2));
		}

		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 if (a + b < c * 2) {
			System.out.println(a * x + b * y);
		} else {
			int ab = Math.min(x, y);
			System.out.println(Math.min((x - ab) * a + (y - ab) * b + c * ab * 2, c * Math.max(x, y) * 2));
		} 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 {
			int ab = Math.min(x, y);
			System.out.println(Math.min((x - ab) * a + (y - ab) * b + c * ab * 2, c * Math.max(x, y) * 2));
		} int ab = Math.min(x, y); ab Math.min(x, y) Math.min Math x y System.out.println(Math.min((x - ab) * a + (y - ab) * b + c * ab * 2, c * Math.max(x, y) * 2)) System.out.println System.out System System.out Math.min((x - ab) * a + (y - ab) * b + c * ab * 2, c * Math.max(x, y) * 2) Math.min Math (x - ab) * a + (y - ab) * b + c * ab * 2 (x - ab) * a + (y - ab) * b + c * ab * 2 (x - ab) * a (x - ab) x ab a (y - ab) * b (y - ab) y ab b c * ab * 2 c * ab * 2 c ab 2 c * Math.max(x, y) * 2 c * Math.max(x, y) * 2 c Math.max(x, y) Math.max Math x y 2 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();

		if (a + b < c * 2) {
			System.out.println(a * x + b * y);
		} else {
			int ab = Math.min(x, y);
			System.out.println(Math.min((x - ab) * a + (y - ab) * b + c * ab * 2, c * Math.max(x, y) * 2));
		}

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

		if (a + b < c * 2) {
			System.out.println(a * x + b * y);
		} else {
			int ab = Math.min(x, y);
			System.out.println(Math.min((x - ab) * a + (y - ab) * b + c * ab * 2, c * Math.max(x, y) * 2));
		}

		sc.close();
	}
} 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);
		} else {
			int ab = Math.min(x, y);
			System.out.println(Math.min((x - ab) * a + (y - ab) * b + c * ab * 2, c * Math.max(x, y) * 2));
		}

		sc.close();
	}
}