import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author silviase
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CHalfAndHalf solver = new CHalfAndHalf();
        solver.solve(1, in, out);
        out.close();
    }

    static class CHalfAndHalf {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long a = in.nextInt();
            long b = in.nextInt();
            long c = in.nextInt();
            long x = in.nextInt();
            long y = in.nextInt();
            long min = Long.MAX_VALUE;
            for (int i = 0; i <= Math.max(x, y); i++) {
                min = Math.min(min, a * Math.max(0, x - i) + b * Math.max(0, y - i) + c * 2 * i);
            }
            out.println(min);

        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CHalfAndHalf solver = new CHalfAndHalf();
        solver.solve(1, in, out);
        out.close();
    }

    static class CHalfAndHalf {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long a = in.nextInt();
            long b = in.nextInt();
            long c = in.nextInt();
            long x = in.nextInt();
            long y = in.nextInt();
            long min = Long.MAX_VALUE;
            for (int i = 0; i <= Math.max(x, y); i++) {
                min = Math.min(min, a * Math.max(0, x - i) + b * Math.max(0, y - i) + c * 2 * i);
            }
            out.println(min);

        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CHalfAndHalf solver = new CHalfAndHalf();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CHalfAndHalf solver = new CHalfAndHalf();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) CHalfAndHalf solver = new CHalfAndHalf(); solver new CHalfAndHalf() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class CHalfAndHalf {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long a = in.nextInt();
            long b = in.nextInt();
            long c = in.nextInt();
            long x = in.nextInt();
            long y = in.nextInt();
            long min = Long.MAX_VALUE;
            for (int i = 0; i <= Math.max(x, y); i++) {
                min = Math.min(min, a * Math.max(0, x - i) + b * Math.max(0, y - i) + c * 2 * i);
            }
            out.println(min);

        }

    } CHalfAndHalf public void solve(int testNumber, Scanner in, PrintWriter out) {
            long a = in.nextInt();
            long b = in.nextInt();
            long c = in.nextInt();
            long x = in.nextInt();
            long y = in.nextInt();
            long min = Long.MAX_VALUE;
            for (int i = 0; i <= Math.max(x, y); i++) {
                min = Math.min(min, a * Math.max(0, x - i) + b * Math.max(0, y - i) + c * 2 * i);
            }
            out.println(min);

        } solve {
            long a = in.nextInt();
            long b = in.nextInt();
            long c = in.nextInt();
            long x = in.nextInt();
            long y = in.nextInt();
            long min = Long.MAX_VALUE;
            for (int i = 0; i <= Math.max(x, y); i++) {
                min = Math.min(min, a * Math.max(0, x - i) + b * Math.max(0, y - i) + c * 2 * i);
            }
            out.println(min);

        } long a = in.nextInt(); a in.nextInt() in.nextInt in long b = in.nextInt(); b in.nextInt() in.nextInt in long c = in.nextInt(); c in.nextInt() in.nextInt in long x = in.nextInt(); x in.nextInt() in.nextInt in long y = in.nextInt(); y in.nextInt() in.nextInt in long min = Long.MAX_VALUE; min Long.MAX_VALUE Long Long.MAX_VALUE for (int i = 0; i <= Math.max(x, y); i++) {
                min = Math.min(min, a * Math.max(0, x - i) + b * Math.max(0, y - i) + c * 2 * i);
            } int i = 0; int i = 0; i 0 i <= Math.max(x, y) i Math.max(x, y) Math.max Math x y i++ i++ i {
                min = Math.min(min, a * Math.max(0, x - i) + b * Math.max(0, y - i) + c * 2 * i);
            } {
                min = Math.min(min, a * Math.max(0, x - i) + b * Math.max(0, y - i) + c * 2 * i);
            } min = Math.min(min, a * Math.max(0, x - i) + b * Math.max(0, y - i) + c * 2 * i) min Math.min(min, a * Math.max(0, x - i) + b * Math.max(0, y - i) + c * 2 * i) Math.min Math min a * Math.max(0, x - i) + b * Math.max(0, y - i) + c * 2 * i a * Math.max(0, x - i) + b * Math.max(0, y - i) + c * 2 * i a * Math.max(0, x - i) a Math.max(0, x - i) Math.max Math 0 x - i x i b * Math.max(0, y - i) b Math.max(0, y - i) Math.max Math 0 y - i y i c * 2 * i c * 2 * i c 2 i out.println(min) out.println out min int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CHalfAndHalf solver = new CHalfAndHalf();
        solver.solve(1, in, out);
        out.close();
    }

    static class CHalfAndHalf {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long a = in.nextInt();
            long b = in.nextInt();
            long c = in.nextInt();
            long x = in.nextInt();
            long y = in.nextInt();
            long min = Long.MAX_VALUE;
            for (int i = 0; i <= Math.max(x, y); i++) {
                min = Math.min(min, a * Math.max(0, x - i) + b * Math.max(0, y - i) + c * 2 * i);
            }
            out.println(min);

        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CHalfAndHalf solver = new CHalfAndHalf();
        solver.solve(1, in, out);
        out.close();
    }

    static class CHalfAndHalf {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long a = in.nextInt();
            long b = in.nextInt();
            long c = in.nextInt();
            long x = in.nextInt();
            long y = in.nextInt();
            long min = Long.MAX_VALUE;
            for (int i = 0; i <= Math.max(x, y); i++) {
                min = Math.min(min, a * Math.max(0, x - i) + b * Math.max(0, y - i) + c * 2 * i);
            }
            out.println(min);

        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author silviase
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CHalfAndHalf solver = new CHalfAndHalf();
        solver.solve(1, in, out);
        out.close();
    }

    static class CHalfAndHalf {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long a = in.nextInt();
            long b = in.nextInt();
            long c = in.nextInt();
            long x = in.nextInt();
            long y = in.nextInt();
            long min = Long.MAX_VALUE;
            for (int i = 0; i <= Math.max(x, y); i++) {
                min = Math.min(min, a * Math.max(0, x - i) + b * Math.max(0, y - i) + c * 2 * i);
            }
            out.println(min);

        }

    }
}

