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[] get = br.readLine().split(" ");
		int a = Integer.parseInt(get[0]);
		int b = Integer.parseInt(get[1]);
		int c = Integer.parseInt(get[2]);
		int x = Integer.parseInt(get[3]);
		int y = Integer.parseInt(get[4]);

		int money = (int)Math.pow(10, 10);

		money = Math.min((a*x) + (b*y),Math.max(x, y)*2*c);
		int add = 0;

		if(x>y)add = (y*2*c) + ((x-y)*a);
		else add = (x*2*c) + ((y-x)*b);

		money = Math.min(money,add);

		System.out.println(money);
	}

} 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[] get = br.readLine().split(" ");
		int a = Integer.parseInt(get[0]);
		int b = Integer.parseInt(get[1]);
		int c = Integer.parseInt(get[2]);
		int x = Integer.parseInt(get[3]);
		int y = Integer.parseInt(get[4]);

		int money = (int)Math.pow(10, 10);

		money = Math.min((a*x) + (b*y),Math.max(x, y)*2*c);
		int add = 0;

		if(x>y)add = (y*2*c) + ((x-y)*a);
		else add = (x*2*c) + ((y-x)*b);

		money = Math.min(money,add);

		System.out.println(money);
	}

} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] get = br.readLine().split(" ");
		int a = Integer.parseInt(get[0]);
		int b = Integer.parseInt(get[1]);
		int c = Integer.parseInt(get[2]);
		int x = Integer.parseInt(get[3]);
		int y = Integer.parseInt(get[4]);

		int money = (int)Math.pow(10, 10);

		money = Math.min((a*x) + (b*y),Math.max(x, y)*2*c);
		int add = 0;

		if(x>y)add = (y*2*c) + ((x-y)*a);
		else add = (x*2*c) + ((y-x)*b);

		money = Math.min(money,add);

		System.out.println(money);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] get = br.readLine().split(" ");
		int a = Integer.parseInt(get[0]);
		int b = Integer.parseInt(get[1]);
		int c = Integer.parseInt(get[2]);
		int x = Integer.parseInt(get[3]);
		int y = Integer.parseInt(get[4]);

		int money = (int)Math.pow(10, 10);

		money = Math.min((a*x) + (b*y),Math.max(x, y)*2*c);
		int add = 0;

		if(x>y)add = (y*2*c) + ((x-y)*a);
		else add = (x*2*c) + ((y-x)*b);

		money = Math.min(money,add);

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

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] get = br.readLine().split(" ");
		int a = Integer.parseInt(get[0]);
		int b = Integer.parseInt(get[1]);
		int c = Integer.parseInt(get[2]);
		int x = Integer.parseInt(get[3]);
		int y = Integer.parseInt(get[4]);

		int money = (int)Math.pow(10, 10);

		money = Math.min((a*x) + (b*y),Math.max(x, y)*2*c);
		int add = 0;

		if(x>y)add = (y*2*c) + ((x-y)*a);
		else add = (x*2*c) + ((y-x)*b);

		money = Math.min(money,add);

		System.out.println(money);
	}

} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] get = br.readLine().split(" ");
		int a = Integer.parseInt(get[0]);
		int b = Integer.parseInt(get[1]);
		int c = Integer.parseInt(get[2]);
		int x = Integer.parseInt(get[3]);
		int y = Integer.parseInt(get[4]);

		int money = (int)Math.pow(10, 10);

		money = Math.min((a*x) + (b*y),Math.max(x, y)*2*c);
		int add = 0;

		if(x>y)add = (y*2*c) + ((x-y)*a);
		else add = (x*2*c) + ((y-x)*b);

		money = Math.min(money,add);

		System.out.println(money);
	}

} 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[] get = br.readLine().split(" ");
		int a = Integer.parseInt(get[0]);
		int b = Integer.parseInt(get[1]);
		int c = Integer.parseInt(get[2]);
		int x = Integer.parseInt(get[3]);
		int y = Integer.parseInt(get[4]);

		int money = (int)Math.pow(10, 10);

		money = Math.min((a*x) + (b*y),Math.max(x, y)*2*c);
		int add = 0;

		if(x>y)add = (y*2*c) + ((x-y)*a);
		else add = (x*2*c) + ((y-x)*b);

		money = Math.min(money,add);

		System.out.println(money);
	}

}
