import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");
		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[1]);
		int c = Integer.parseInt(str[2]);
		int x = Integer.parseInt(str[3]);
		int y = Integer.parseInt(str[4]);

		int ab = a * x + b * y;

		int min = 0;
		int max = 0;
		int than = 0;

		if (x > y) {
			min = 2 * y;
			max = 2 * x;
			than = a * (x - y);
		} else {
			min = 2 * x;
			max = 2 * y;
			than = b * (y - x);
		}

		int z = c * min + than;
		int zz = c * max;

		if (ab > z) {
			System.out.println(Math.min(z, zz));
		} else {
			System.out.println(Math.min(ab, zz));
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");
		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[1]);
		int c = Integer.parseInt(str[2]);
		int x = Integer.parseInt(str[3]);
		int y = Integer.parseInt(str[4]);

		int ab = a * x + b * y;

		int min = 0;
		int max = 0;
		int than = 0;

		if (x > y) {
			min = 2 * y;
			max = 2 * x;
			than = a * (x - y);
		} else {
			min = 2 * x;
			max = 2 * y;
			than = b * (y - x);
		}

		int z = c * min + than;
		int zz = c * max;

		if (ab > z) {
			System.out.println(Math.min(z, zz));
		} else {
			System.out.println(Math.min(ab, zz));
		}
	}
} Main public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");
		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[1]);
		int c = Integer.parseInt(str[2]);
		int x = Integer.parseInt(str[3]);
		int y = Integer.parseInt(str[4]);

		int ab = a * x + b * y;

		int min = 0;
		int max = 0;
		int than = 0;

		if (x > y) {
			min = 2 * y;
			max = 2 * x;
			than = a * (x - y);
		} else {
			min = 2 * x;
			max = 2 * y;
			than = b * (y - x);
		}

		int z = c * min + than;
		int zz = c * max;

		if (ab > z) {
			System.out.println(Math.min(z, zz));
		} else {
			System.out.println(Math.min(ab, zz));
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");
		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[1]);
		int c = Integer.parseInt(str[2]);
		int x = Integer.parseInt(str[3]);
		int y = Integer.parseInt(str[4]);

		int ab = a * x + b * y;

		int min = 0;
		int max = 0;
		int than = 0;

		if (x > y) {
			min = 2 * y;
			max = 2 * x;
			than = a * (x - y);
		} else {
			min = 2 * x;
			max = 2 * y;
			than = b * (y - x);
		}

		int z = c * min + than;
		int zz = c * max;

		if (ab > z) {
			System.out.println(Math.min(z, zz));
		} else {
			System.out.println(Math.min(ab, zz));
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str[] = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a = Integer.parseInt(str[0]); a Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int b = Integer.parseInt(str[1]); b Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int c = Integer.parseInt(str[2]); c Integer.parseInt(str[2]) Integer.parseInt Integer str[2] str 2 int x = Integer.parseInt(str[3]); x Integer.parseInt(str[3]) Integer.parseInt Integer str[3] str 3 int y = Integer.parseInt(str[4]); y Integer.parseInt(str[4]) Integer.parseInt Integer str[4] str 4 int ab = a * x + b * y; ab a * x + b * y a * x a x b * y b y int min = 0; min 0 int max = 0; max 0 int than = 0; than 0 if (x > y) {
			min = 2 * y;
			max = 2 * x;
			than = a * (x - y);
		} else {
			min = 2 * x;
			max = 2 * y;
			than = b * (y - x);
		} x > y x y {
			min = 2 * y;
			max = 2 * x;
			than = a * (x - y);
		} min = 2 * y min 2 * y 2 y max = 2 * x max 2 * x 2 x than = a * (x - y) than a * (x - y) a (x - y) x y {
			min = 2 * x;
			max = 2 * y;
			than = b * (y - x);
		} min = 2 * x min 2 * x 2 x max = 2 * y max 2 * y 2 y than = b * (y - x) than b * (y - x) b (y - x) y x int z = c * min + than; z c * min + than c * min c min than int zz = c * max; zz c * max c max if (ab > z) {
			System.out.println(Math.min(z, zz));
		} else {
			System.out.println(Math.min(ab, zz));
		} ab > z ab z {
			System.out.println(Math.min(z, zz));
		} System.out.println(Math.min(z, zz)) System.out.println System.out System System.out Math.min(z, zz) Math.min Math z zz {
			System.out.println(Math.min(ab, zz));
		} System.out.println(Math.min(ab, zz)) System.out.println System.out System System.out Math.min(ab, zz) Math.min Math ab zz String args[] args public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");
		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[1]);
		int c = Integer.parseInt(str[2]);
		int x = Integer.parseInt(str[3]);
		int y = Integer.parseInt(str[4]);

		int ab = a * x + b * y;

		int min = 0;
		int max = 0;
		int than = 0;

		if (x > y) {
			min = 2 * y;
			max = 2 * x;
			than = a * (x - y);
		} else {
			min = 2 * x;
			max = 2 * y;
			than = b * (y - x);
		}

		int z = c * min + than;
		int zz = c * max;

		if (ab > z) {
			System.out.println(Math.min(z, zz));
		} else {
			System.out.println(Math.min(ab, zz));
		}
	}
} public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");
		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[1]);
		int c = Integer.parseInt(str[2]);
		int x = Integer.parseInt(str[3]);
		int y = Integer.parseInt(str[4]);

		int ab = a * x + b * y;

		int min = 0;
		int max = 0;
		int than = 0;

		if (x > y) {
			min = 2 * y;
			max = 2 * x;
			than = a * (x - y);
		} else {
			min = 2 * x;
			max = 2 * y;
			than = b * (y - x);
		}

		int z = c * min + than;
		int zz = c * max;

		if (ab > z) {
			System.out.println(Math.min(z, zz));
		} else {
			System.out.println(Math.min(ab, zz));
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");
		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[1]);
		int c = Integer.parseInt(str[2]);
		int x = Integer.parseInt(str[3]);
		int y = Integer.parseInt(str[4]);

		int ab = a * x + b * y;

		int min = 0;
		int max = 0;
		int than = 0;

		if (x > y) {
			min = 2 * y;
			max = 2 * x;
			than = a * (x - y);
		} else {
			min = 2 * x;
			max = 2 * y;
			than = b * (y - x);
		}

		int z = c * min + than;
		int zz = c * max;

		if (ab > z) {
			System.out.println(Math.min(z, zz));
		} else {
			System.out.println(Math.min(ab, zz));
		}
	}
}