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
 */
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) {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            int C = Integer.parseInt(in.next());
            int X = Integer.parseInt(in.next());
            int Y = Integer.parseInt(in.next());

            long ans = 1L << 60;
            for (int i = 0; i < 100001; i++) {
                ans = Math.min(ans, 2 * C * i + A * Math.max(0, X - i) + B * Math.max(0, Y - i));
            }
            out.println(ans);
        }

    }
}
 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) {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            int C = Integer.parseInt(in.next());
            int X = Integer.parseInt(in.next());
            int Y = Integer.parseInt(in.next());

            long ans = 1L << 60;
            for (int i = 0; i < 100001; i++) {
                ans = Math.min(ans, 2 * C * i + A * Math.max(0, X - i) + B * Math.max(0, Y - i));
            }
            out.println(ans);
        }

    }
} 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) {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            int C = Integer.parseInt(in.next());
            int X = Integer.parseInt(in.next());
            int Y = Integer.parseInt(in.next());

            long ans = 1L << 60;
            for (int i = 0; i < 100001; i++) {
                ans = Math.min(ans, 2 * C * i + A * Math.max(0, X - i) + B * Math.max(0, Y - i));
            }
            out.println(ans);
        }

    } CHalfAndHalf public void solve(int testNumber, Scanner in, PrintWriter out) {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            int C = Integer.parseInt(in.next());
            int X = Integer.parseInt(in.next());
            int Y = Integer.parseInt(in.next());

            long ans = 1L << 60;
            for (int i = 0; i < 100001; i++) {
                ans = Math.min(ans, 2 * C * i + A * Math.max(0, X - i) + B * Math.max(0, Y - i));
            }
            out.println(ans);
        } solve {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            int C = Integer.parseInt(in.next());
            int X = Integer.parseInt(in.next());
            int Y = Integer.parseInt(in.next());

            long ans = 1L << 60;
            for (int i = 0; i < 100001; i++) {
                ans = Math.min(ans, 2 * C * i + A * Math.max(0, X - i) + B * Math.max(0, Y - i));
            }
            out.println(ans);
        } int A = Integer.parseInt(in.next()); A Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int B = Integer.parseInt(in.next()); B Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int C = Integer.parseInt(in.next()); C Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int X = Integer.parseInt(in.next()); X Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int Y = Integer.parseInt(in.next()); Y Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in long ans = 1L << 60; ans 1L << 60 1L 60 for (int i = 0; i < 100001; i++) {
                ans = Math.min(ans, 2 * C * i + A * Math.max(0, X - i) + B * Math.max(0, Y - i));
            } int i = 0; int i = 0; i 0 i < 100001 i 100001 i++ i++ i {
                ans = Math.min(ans, 2 * C * i + A * Math.max(0, X - i) + B * Math.max(0, Y - i));
            } {
                ans = Math.min(ans, 2 * C * i + A * Math.max(0, X - i) + B * Math.max(0, Y - i));
            } ans = Math.min(ans, 2 * C * i + A * Math.max(0, X - i) + B * Math.max(0, Y - i)) ans Math.min(ans, 2 * C * i + A * Math.max(0, X - i) + B * Math.max(0, Y - i)) Math.min Math ans 2 * C * i + A * Math.max(0, X - i) + B * Math.max(0, Y - i) 2 * C * i + A * Math.max(0, X - i) + B * Math.max(0, Y - i) 2 * C * i 2 * C * i 2 C 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 out.println(ans) out.println out ans 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) {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            int C = Integer.parseInt(in.next());
            int X = Integer.parseInt(in.next());
            int Y = Integer.parseInt(in.next());

            long ans = 1L << 60;
            for (int i = 0; i < 100001; i++) {
                ans = Math.min(ans, 2 * C * i + A * Math.max(0, X - i) + B * Math.max(0, Y - i));
            }
            out.println(ans);
        }

    }
} 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) {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            int C = Integer.parseInt(in.next());
            int X = Integer.parseInt(in.next());
            int Y = Integer.parseInt(in.next());

            long ans = 1L << 60;
            for (int i = 0; i < 100001; i++) {
                ans = Math.min(ans, 2 * C * i + A * Math.max(0, X - i) + B * Math.max(0, Y - i));
            }
            out.println(ans);
        }

    }
} 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
 */
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) {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            int C = Integer.parseInt(in.next());
            int X = Integer.parseInt(in.next());
            int Y = Integer.parseInt(in.next());

            long ans = 1L << 60;
            for (int i = 0; i < 100001; i++) {
                ans = Math.min(ans, 2 * C * i + A * Math.max(0, X - i) + B * Math.max(0, Y - i));
            }
            out.println(ans);
        }

    }
}

