import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * 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;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long x = in.nextLong();
            long y = in.nextLong();

            long ans = Long.MAX_VALUE;
            for (long i = 0; i < 100001; i++) {
                long tmp = 0;
                tmp += 2 * c * i;
                tmp += a * Math.max(0, x - i);
                tmp += b * Math.max(0, y - i);

                ans = Math.min(ans, tmp);
            }

            out.println(ans);
        }

    }

    static class InputReader {
        BufferedReader in;
        StringTokenizer tok;

        public String nextString() {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(nextString());
        }

        public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        }

    }
}
 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.StringTokenizer; StringTokenizer java.util import java.io.IOException; IOException java.io import java.util.InputMismatchException; InputMismatchException java.util import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.InputStream; InputStream java.io public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long x = in.nextLong();
            long y = in.nextLong();

            long ans = Long.MAX_VALUE;
            for (long i = 0; i < 100001; i++) {
                long tmp = 0;
                tmp += 2 * c * i;
                tmp += a * Math.max(0, x - i);
                tmp += b * Math.max(0, y - i);

                ans = Math.min(ans, tmp);
            }

            out.println(ans);
        }

    }

    static class InputReader {
        BufferedReader in;
        StringTokenizer tok;

        public String nextString() {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(nextString());
        }

        public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        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 InputReader in = new InputReader(inputStream); in new InputReader(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) TaskC solver = new TaskC(); solver new TaskC() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long x = in.nextLong();
            long y = in.nextLong();

            long ans = Long.MAX_VALUE;
            for (long i = 0; i < 100001; i++) {
                long tmp = 0;
                tmp += 2 * c * i;
                tmp += a * Math.max(0, x - i);
                tmp += b * Math.max(0, y - i);

                ans = Math.min(ans, tmp);
            }

            out.println(ans);
        }

    } TaskC public void solve(int testNumber, InputReader in, PrintWriter out) {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long x = in.nextLong();
            long y = in.nextLong();

            long ans = Long.MAX_VALUE;
            for (long i = 0; i < 100001; i++) {
                long tmp = 0;
                tmp += 2 * c * i;
                tmp += a * Math.max(0, x - i);
                tmp += b * Math.max(0, y - i);

                ans = Math.min(ans, tmp);
            }

            out.println(ans);
        } solve {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long x = in.nextLong();
            long y = in.nextLong();

            long ans = Long.MAX_VALUE;
            for (long i = 0; i < 100001; i++) {
                long tmp = 0;
                tmp += 2 * c * i;
                tmp += a * Math.max(0, x - i);
                tmp += b * Math.max(0, y - i);

                ans = Math.min(ans, tmp);
            }

            out.println(ans);
        } long a = in.nextLong(); a in.nextLong() in.nextLong in long b = in.nextLong(); b in.nextLong() in.nextLong in long c = in.nextLong(); c in.nextLong() in.nextLong in long x = in.nextLong(); x in.nextLong() in.nextLong in long y = in.nextLong(); y in.nextLong() in.nextLong in long ans = Long.MAX_VALUE; ans Long.MAX_VALUE Long Long.MAX_VALUE for (long i = 0; i < 100001; i++) {
                long tmp = 0;
                tmp += 2 * c * i;
                tmp += a * Math.max(0, x - i);
                tmp += b * Math.max(0, y - i);

                ans = Math.min(ans, tmp);
            } long i = 0; long i = 0; i 0 i < 100001 i 100001 i++ i++ i {
                long tmp = 0;
                tmp += 2 * c * i;
                tmp += a * Math.max(0, x - i);
                tmp += b * Math.max(0, y - i);

                ans = Math.min(ans, tmp);
            } {
                long tmp = 0;
                tmp += 2 * c * i;
                tmp += a * Math.max(0, x - i);
                tmp += b * Math.max(0, y - i);

                ans = Math.min(ans, tmp);
            } long tmp = 0; tmp 0 tmp += 2 * c * i tmp 2 * c * i 2 * c * i 2 c i tmp += a * Math.max(0, x - i) tmp a * Math.max(0, x - i) a Math.max(0, x - i) Math.max Math 0 x - i x i tmp += b * Math.max(0, y - i) tmp b * Math.max(0, y - i) b Math.max(0, y - i) Math.max Math 0 y - i y i ans = Math.min(ans, tmp) ans Math.min(ans, tmp) Math.min Math ans tmp out.println(ans) out.println out ans int testNumber testNumber InputReader in in PrintWriter out out static class InputReader {
        BufferedReader in;
        StringTokenizer tok;

        public String nextString() {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(nextString());
        }

        public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        }

    } InputReader BufferedReader in; in StringTokenizer tok; tok public String nextString() {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        } nextString {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        } while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            } !tok.hasMoreTokens() tok.hasMoreTokens() tok.hasMoreTokens tok {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            } try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                } catch (IOException e) {
                    throw new InputMismatchException();
                } IOException e {
                    throw new InputMismatchException();
                } throw new InputMismatchException(); new InputMismatchException() {
                    tok = new StringTokenizer(in.readLine(), " ");
                } tok = new StringTokenizer(in.readLine(), " ") tok new StringTokenizer(in.readLine(), " ") return tok.nextToken(); tok.nextToken() tok.nextToken tok public long nextLong() {
            return Long.parseLong(nextString());
        } nextLong {
            return Long.parseLong(nextString());
        } return Long.parseLong(nextString()); Long.parseLong(nextString()) Long.parseLong Long nextString() nextString public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        } InputReader {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        } in = new BufferedReader(new InputStreamReader(inputStream)) in new BufferedReader(new InputStreamReader(inputStream)) tok = new StringTokenizer("") tok new StringTokenizer("") InputStream inputStream inputStream public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long x = in.nextLong();
            long y = in.nextLong();

            long ans = Long.MAX_VALUE;
            for (long i = 0; i < 100001; i++) {
                long tmp = 0;
                tmp += 2 * c * i;
                tmp += a * Math.max(0, x - i);
                tmp += b * Math.max(0, y - i);

                ans = Math.min(ans, tmp);
            }

            out.println(ans);
        }

    }

    static class InputReader {
        BufferedReader in;
        StringTokenizer tok;

        public String nextString() {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(nextString());
        }

        public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        }

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

    static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long x = in.nextLong();
            long y = in.nextLong();

            long ans = Long.MAX_VALUE;
            for (long i = 0; i < 100001; i++) {
                long tmp = 0;
                tmp += 2 * c * i;
                tmp += a * Math.max(0, x - i);
                tmp += b * Math.max(0, y - i);

                ans = Math.min(ans, tmp);
            }

            out.println(ans);
        }

    }

    static class InputReader {
        BufferedReader in;
        StringTokenizer tok;

        public String nextString() {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(nextString());
        }

        public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * 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;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long x = in.nextLong();
            long y = in.nextLong();

            long ans = Long.MAX_VALUE;
            for (long i = 0; i < 100001; i++) {
                long tmp = 0;
                tmp += 2 * c * i;
                tmp += a * Math.max(0, x - i);
                tmp += b * Math.max(0, y - i);

                ans = Math.min(ans, tmp);
            }

            out.println(ans);
        }

    }

    static class InputReader {
        BufferedReader in;
        StringTokenizer tok;

        public String nextString() {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(nextString());
        }

        public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        }

    }
}

