import java.util.*;
import java.io.*;
public class Main{
	static BufferedReader br;
    static PrintWriter out;
    static StringTokenizer st;
	public static void main(String[] args) throws IOException{
	    br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new OutputStreamWriter(System.out));
        int A = readInt(), B = readInt(), C = readInt(), X = readInt(), Y = readInt();
        int op1 = A*X + B*Y;
        int min = Math.min(X, Y);
        int op2 = min*C*2 + A*(X-min) + B*(Y-min);
        int op3 = Math.max(X,Y)*C*2;
        int Best = Math.min(Math.min(op1, op2), op3);
        System.out.println(Best);
	}
	static String next () throws IOException {
	    while (st == null || !st.hasMoreTokens())
	    st = new StringTokenizer(br.readLine().trim());
	    return st.nextToken();
	}

	static long readLong () throws IOException {
	    return Long.parseLong(next());
	}

	static int readInt () throws IOException {
	    return Integer.parseInt(next());
	}

	static double readDouble () throws IOException {
	    return Double.parseDouble(next());
	}

	static char readCharacter () throws IOException {
	    return next().charAt(0);
	}

	static String readLine () throws IOException {
	    return br.readLine().trim();
	}
}
 import java.util.*; util.* java import java.io.*; io.* java public class Main{
	static BufferedReader br;
    static PrintWriter out;
    static StringTokenizer st;
	public static void main(String[] args) throws IOException{
	    br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new OutputStreamWriter(System.out));
        int A = readInt(), B = readInt(), C = readInt(), X = readInt(), Y = readInt();
        int op1 = A*X + B*Y;
        int min = Math.min(X, Y);
        int op2 = min*C*2 + A*(X-min) + B*(Y-min);
        int op3 = Math.max(X,Y)*C*2;
        int Best = Math.min(Math.min(op1, op2), op3);
        System.out.println(Best);
	}
	static String next () throws IOException {
	    while (st == null || !st.hasMoreTokens())
	    st = new StringTokenizer(br.readLine().trim());
	    return st.nextToken();
	}

	static long readLong () throws IOException {
	    return Long.parseLong(next());
	}

	static int readInt () throws IOException {
	    return Integer.parseInt(next());
	}

	static double readDouble () throws IOException {
	    return Double.parseDouble(next());
	}

	static char readCharacter () throws IOException {
	    return next().charAt(0);
	}

	static String readLine () throws IOException {
	    return br.readLine().trim();
	}
} Main static BufferedReader br; br static PrintWriter out; out static StringTokenizer st; st public static void main(String[] args) throws IOException{
	    br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new OutputStreamWriter(System.out));
        int A = readInt(), B = readInt(), C = readInt(), X = readInt(), Y = readInt();
        int op1 = A*X + B*Y;
        int min = Math.min(X, Y);
        int op2 = min*C*2 + A*(X-min) + B*(Y-min);
        int op3 = Math.max(X,Y)*C*2;
        int Best = Math.min(Math.min(op1, op2), op3);
        System.out.println(Best);
	} main {
	    br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new OutputStreamWriter(System.out));
        int A = readInt(), B = readInt(), C = readInt(), X = readInt(), Y = readInt();
        int op1 = A*X + B*Y;
        int min = Math.min(X, Y);
        int op2 = min*C*2 + A*(X-min) + B*(Y-min);
        int op3 = Math.max(X,Y)*C*2;
        int Best = Math.min(Math.min(op1, op2), op3);
        System.out.println(Best);
	} br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) out = new PrintWriter(new OutputStreamWriter(System.out)) out new PrintWriter(new OutputStreamWriter(System.out)) int A = readInt() A readInt() readInt B = readInt() B readInt() readInt C = readInt() C readInt() readInt X = readInt() X readInt() readInt Y = readInt(); Y readInt() readInt int op1 = A*X + B*Y; op1 A*X + B*Y A*X A X B*Y B Y int min = Math.min(X, Y); min Math.min(X, Y) Math.min Math X Y int op2 = min*C*2 + A*(X-min) + B*(Y-min); op2 min*C*2 + A*(X-min) + B*(Y-min) min*C*2 + A*(X-min) + B*(Y-min) min*C*2 min*C*2 min C 2 A*(X-min) A (X-min) X min B*(Y-min) B (Y-min) Y min int op3 = Math.max(X,Y)*C*2; op3 Math.max(X,Y)*C*2 Math.max(X,Y)*C*2 Math.max(X,Y) Math.max Math X Y C 2 int Best = Math.min(Math.min(op1, op2), op3); Best Math.min(Math.min(op1, op2), op3) Math.min Math Math.min(op1, op2) Math.min Math op1 op2 op3 System.out.println(Best) System.out.println System.out System System.out Best String[] args args static String next () throws IOException {
	    while (st == null || !st.hasMoreTokens())
	    st = new StringTokenizer(br.readLine().trim());
	    return st.nextToken();
	} next {
	    while (st == null || !st.hasMoreTokens())
	    st = new StringTokenizer(br.readLine().trim());
	    return st.nextToken();
	} while (st == null || !st.hasMoreTokens())
	    st = new StringTokenizer(br.readLine().trim()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine().trim()) st new StringTokenizer(br.readLine().trim()) return st.nextToken(); st.nextToken() st.nextToken st static long readLong () throws IOException {
	    return Long.parseLong(next());
	} readLong {
	    return Long.parseLong(next());
	} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next static int readInt () throws IOException {
	    return Integer.parseInt(next());
	} readInt {
	    return Integer.parseInt(next());
	} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next static double readDouble () throws IOException {
	    return Double.parseDouble(next());
	} readDouble {
	    return Double.parseDouble(next());
	} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next static char readCharacter () throws IOException {
	    return next().charAt(0);
	} readCharacter {
	    return next().charAt(0);
	} return next().charAt(0); next().charAt(0) next().charAt next() next 0 static String readLine () throws IOException {
	    return br.readLine().trim();
	} readLine {
	    return br.readLine().trim();
	} return br.readLine().trim(); br.readLine().trim() br.readLine().trim br.readLine() br.readLine br public class Main{
	static BufferedReader br;
    static PrintWriter out;
    static StringTokenizer st;
	public static void main(String[] args) throws IOException{
	    br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new OutputStreamWriter(System.out));
        int A = readInt(), B = readInt(), C = readInt(), X = readInt(), Y = readInt();
        int op1 = A*X + B*Y;
        int min = Math.min(X, Y);
        int op2 = min*C*2 + A*(X-min) + B*(Y-min);
        int op3 = Math.max(X,Y)*C*2;
        int Best = Math.min(Math.min(op1, op2), op3);
        System.out.println(Best);
	}
	static String next () throws IOException {
	    while (st == null || !st.hasMoreTokens())
	    st = new StringTokenizer(br.readLine().trim());
	    return st.nextToken();
	}

	static long readLong () throws IOException {
	    return Long.parseLong(next());
	}

	static int readInt () throws IOException {
	    return Integer.parseInt(next());
	}

	static double readDouble () throws IOException {
	    return Double.parseDouble(next());
	}

	static char readCharacter () throws IOException {
	    return next().charAt(0);
	}

	static String readLine () throws IOException {
	    return br.readLine().trim();
	}
} public class Main{
	static BufferedReader br;
    static PrintWriter out;
    static StringTokenizer st;
	public static void main(String[] args) throws IOException{
	    br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new OutputStreamWriter(System.out));
        int A = readInt(), B = readInt(), C = readInt(), X = readInt(), Y = readInt();
        int op1 = A*X + B*Y;
        int min = Math.min(X, Y);
        int op2 = min*C*2 + A*(X-min) + B*(Y-min);
        int op3 = Math.max(X,Y)*C*2;
        int Best = Math.min(Math.min(op1, op2), op3);
        System.out.println(Best);
	}
	static String next () throws IOException {
	    while (st == null || !st.hasMoreTokens())
	    st = new StringTokenizer(br.readLine().trim());
	    return st.nextToken();
	}

	static long readLong () throws IOException {
	    return Long.parseLong(next());
	}

	static int readInt () throws IOException {
	    return Integer.parseInt(next());
	}

	static double readDouble () throws IOException {
	    return Double.parseDouble(next());
	}

	static char readCharacter () throws IOException {
	    return next().charAt(0);
	}

	static String readLine () throws IOException {
	    return br.readLine().trim();
	}
} Main
import java.util.*;
import java.io.*;
public class Main{
	static BufferedReader br;
    static PrintWriter out;
    static StringTokenizer st;
	public static void main(String[] args) throws IOException{
	    br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new OutputStreamWriter(System.out));
        int A = readInt(), B = readInt(), C = readInt(), X = readInt(), Y = readInt();
        int op1 = A*X + B*Y;
        int min = Math.min(X, Y);
        int op2 = min*C*2 + A*(X-min) + B*(Y-min);
        int op3 = Math.max(X,Y)*C*2;
        int Best = Math.min(Math.min(op1, op2), op3);
        System.out.println(Best);
	}
	static String next () throws IOException {
	    while (st == null || !st.hasMoreTokens())
	    st = new StringTokenizer(br.readLine().trim());
	    return st.nextToken();
	}

	static long readLong () throws IOException {
	    return Long.parseLong(next());
	}

	static int readInt () throws IOException {
	    return Integer.parseInt(next());
	}

	static double readDouble () throws IOException {
	    return Double.parseDouble(next());
	}

	static char readCharacter () throws IOException {
	    return next().charAt(0);
	}

	static String readLine () throws IOException {
	    return br.readLine().trim();
	}
}

