import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		Map<Integer, Integer> map = new TreeMap<>();
		int xy[] = new int[2];

		map.put(x, a);
		map.put(y, b);

		int i = 0;
		for (int k : map.keySet()) {
			xy[i] = k;
			i++;
		}

		int ans = 0;
		ans = Math.min(a * xy[0] + b * xy[0], c * xy[0] * 2);

		if (x != y) {
			int t = xy[1] - xy[0];
			ans += Math.min(map.get(xy[1]) * t, c * t * 2);
		}

		System.out.println(ans);

	}
} import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util import java.util.TreeMap; TreeMap java.util public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		Map<Integer, Integer> map = new TreeMap<>();
		int xy[] = new int[2];

		map.put(x, a);
		map.put(y, b);

		int i = 0;
		for (int k : map.keySet()) {
			xy[i] = k;
			i++;
		}

		int ans = 0;
		ans = Math.min(a * xy[0] + b * xy[0], c * xy[0] * 2);

		if (x != y) {
			int t = xy[1] - xy[0];
			ans += Math.min(map.get(xy[1]) * t, c * t * 2);
		}

		System.out.println(ans);

	}
} Main @SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		Map<Integer, Integer> map = new TreeMap<>();
		int xy[] = new int[2];

		map.put(x, a);
		map.put(y, b);

		int i = 0;
		for (int k : map.keySet()) {
			xy[i] = k;
			i++;
		}

		int ans = 0;
		ans = Math.min(a * xy[0] + b * xy[0], c * xy[0] * 2);

		if (x != y) {
			int t = xy[1] - xy[0];
			ans += Math.min(map.get(xy[1]) * t, c * t * 2);
		}

		System.out.println(ans);

	} main {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		Map<Integer, Integer> map = new TreeMap<>();
		int xy[] = new int[2];

		map.put(x, a);
		map.put(y, b);

		int i = 0;
		for (int k : map.keySet()) {
			xy[i] = k;
			i++;
		}

		int ans = 0;
		ans = Math.min(a * xy[0] + b * xy[0], c * xy[0] * 2);

		if (x != y) {
			int t = xy[1] - xy[0];
			ans += Math.min(map.get(xy[1]) * t, c * t * 2);
		}

		System.out.println(ans);

	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner int c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner int y = scanner.nextInt(); y scanner.nextInt() scanner.nextInt scanner Map<Integer, Integer> map = new TreeMap<>(); map new TreeMap<>() int xy[] = new int[2]; xy new int[2] 2 map.put(x, a) map.put map x a map.put(y, b) map.put map y b int i = 0; i 0 for (int k : map.keySet()) {
			xy[i] = k;
			i++;
		} int k map.keySet() map.keySet map {
			xy[i] = k;
			i++;
		} {
			xy[i] = k;
			i++;
		} xy[i] = k xy[i] xy i k i++ i int ans = 0; ans 0 ans = Math.min(a * xy[0] + b * xy[0], c * xy[0] * 2) ans Math.min(a * xy[0] + b * xy[0], c * xy[0] * 2) Math.min Math a * xy[0] + b * xy[0] a * xy[0] a xy[0] xy 0 b * xy[0] b xy[0] xy 0 c * xy[0] * 2 c * xy[0] * 2 c xy[0] xy 0 2 if (x != y) {
			int t = xy[1] - xy[0];
			ans += Math.min(map.get(xy[1]) * t, c * t * 2);
		} x != y x y {
			int t = xy[1] - xy[0];
			ans += Math.min(map.get(xy[1]) * t, c * t * 2);
		} int t = xy[1] - xy[0]; t xy[1] - xy[0] xy[1] xy 1 xy[0] xy 0 ans += Math.min(map.get(xy[1]) * t, c * t * 2) ans Math.min(map.get(xy[1]) * t, c * t * 2) Math.min Math map.get(xy[1]) * t map.get(xy[1]) map.get map xy[1] xy 1 t c * t * 2 c * t * 2 c t 2 System.out.println(ans) System.out.println System.out System System.out ans String args[] args public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		Map<Integer, Integer> map = new TreeMap<>();
		int xy[] = new int[2];

		map.put(x, a);
		map.put(y, b);

		int i = 0;
		for (int k : map.keySet()) {
			xy[i] = k;
			i++;
		}

		int ans = 0;
		ans = Math.min(a * xy[0] + b * xy[0], c * xy[0] * 2);

		if (x != y) {
			int t = xy[1] - xy[0];
			ans += Math.min(map.get(xy[1]) * t, c * t * 2);
		}

		System.out.println(ans);

	}
} public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		Map<Integer, Integer> map = new TreeMap<>();
		int xy[] = new int[2];

		map.put(x, a);
		map.put(y, b);

		int i = 0;
		for (int k : map.keySet()) {
			xy[i] = k;
			i++;
		}

		int ans = 0;
		ans = Math.min(a * xy[0] + b * xy[0], c * xy[0] * 2);

		if (x != y) {
			int t = xy[1] - xy[0];
			ans += Math.min(map.get(xy[1]) * t, c * t * 2);
		}

		System.out.println(ans);

	}
} Main
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		Map<Integer, Integer> map = new TreeMap<>();
		int xy[] = new int[2];

		map.put(x, a);
		map.put(y, b);

		int i = 0;
		for (int k : map.keySet()) {
			xy[i] = k;
			i++;
		}

		int ans = 0;
		ans = Math.min(a * xy[0] + b * xy[0], c * xy[0] * 2);

		if (x != y) {
			int t = xy[1] - xy[0];
			ans += Math.min(map.get(xy[1]) * t, c * t * 2);
		}

		System.out.println(ans);

	}
}
