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

public class Main {
    static int INF = (1 << 30) - 1;
    // static long L_INF = (1L << 62) - 1;
    // static long MOD = (long) 1e9 + 7;

    static class Solver {
        int A, B, C, X, Y;

        // write your code
        void solve(InputReader in, PrintWriter out) {
            A = in.nextInt();
            B = in.nextInt();
            C = in.nextInt();
            X = in.nextInt();
            Y = in.nextInt();

            int ans = INF;
            int cnt_ab = Math.max(X, Y) * 2;
            while (cnt_ab >= 0) {
                int cnt = cnt_ab / 2;
                int cnt_a = X > cnt ? X - cnt : 0;
                int cnt_b = Y > cnt ? Y - cnt : 0;
                ans = Math.min(ans, A * cnt_a + B * cnt_b + C * cnt_ab);
                cnt_ab--;
            }
            out.println(ans);
        }

        void debug(Object... os) {
            System.err.println(Arrays.deepToString(os));
        }
    }

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

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStream; OutputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.*; util.* java public class Main {
    static int INF = (1 << 30) - 1;
    // static long L_INF = (1L << 62) - 1;
    // static long MOD = (long) 1e9 + 7;

    static class Solver {
        int A, B, C, X, Y;

        // write your code
        void solve(InputReader in, PrintWriter out) {
            A = in.nextInt();
            B = in.nextInt();
            C = in.nextInt();
            X = in.nextInt();
            Y = in.nextInt();

            int ans = INF;
            int cnt_ab = Math.max(X, Y) * 2;
            while (cnt_ab >= 0) {
                int cnt = cnt_ab / 2;
                int cnt_a = X > cnt ? X - cnt : 0;
                int cnt_b = Y > cnt ? Y - cnt : 0;
                ans = Math.min(ans, A * cnt_a + B * cnt_b + C * cnt_ab);
                cnt_ab--;
            }
            out.println(ans);
        }

        void debug(Object... os) {
            System.err.println(Arrays.deepToString(os));
        }
    }

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

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
} Main static int INF = (1 << 30) - 1; INF (1 << 30) - 1 (1 << 30) 1 30 1 public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(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) Solver solver = new Solver(); solver new Solver() solver.solve(in, out) solver.solve solver in out out.close() out.close out String[] args args static class Solver {
        int A, B, C, X, Y;

        // write your code
        void solve(InputReader in, PrintWriter out) {
            A = in.nextInt();
            B = in.nextInt();
            C = in.nextInt();
            X = in.nextInt();
            Y = in.nextInt();

            int ans = INF;
            int cnt_ab = Math.max(X, Y) * 2;
            while (cnt_ab >= 0) {
                int cnt = cnt_ab / 2;
                int cnt_a = X > cnt ? X - cnt : 0;
                int cnt_b = Y > cnt ? Y - cnt : 0;
                ans = Math.min(ans, A * cnt_a + B * cnt_b + C * cnt_ab);
                cnt_ab--;
            }
            out.println(ans);
        }

        void debug(Object... os) {
            System.err.println(Arrays.deepToString(os));
        }
    } Solver int A A B B C C X X Y; Y // write your code
        void solve(InputReader in, PrintWriter out) {
            A = in.nextInt();
            B = in.nextInt();
            C = in.nextInt();
            X = in.nextInt();
            Y = in.nextInt();

            int ans = INF;
            int cnt_ab = Math.max(X, Y) * 2;
            while (cnt_ab >= 0) {
                int cnt = cnt_ab / 2;
                int cnt_a = X > cnt ? X - cnt : 0;
                int cnt_b = Y > cnt ? Y - cnt : 0;
                ans = Math.min(ans, A * cnt_a + B * cnt_b + C * cnt_ab);
                cnt_ab--;
            }
            out.println(ans);
        } solve {
            A = in.nextInt();
            B = in.nextInt();
            C = in.nextInt();
            X = in.nextInt();
            Y = in.nextInt();

            int ans = INF;
            int cnt_ab = Math.max(X, Y) * 2;
            while (cnt_ab >= 0) {
                int cnt = cnt_ab / 2;
                int cnt_a = X > cnt ? X - cnt : 0;
                int cnt_b = Y > cnt ? Y - cnt : 0;
                ans = Math.min(ans, A * cnt_a + B * cnt_b + C * cnt_ab);
                cnt_ab--;
            }
            out.println(ans);
        } A = in.nextInt() A in.nextInt() in.nextInt in B = in.nextInt() B in.nextInt() in.nextInt in C = in.nextInt() C in.nextInt() in.nextInt in X = in.nextInt() X in.nextInt() in.nextInt in Y = in.nextInt() Y in.nextInt() in.nextInt in int ans = INF; ans INF int cnt_ab = Math.max(X, Y) * 2; cnt_ab Math.max(X, Y) * 2 Math.max(X, Y) Math.max Math X Y 2 while (cnt_ab >= 0) {
                int cnt = cnt_ab / 2;
                int cnt_a = X > cnt ? X - cnt : 0;
                int cnt_b = Y > cnt ? Y - cnt : 0;
                ans = Math.min(ans, A * cnt_a + B * cnt_b + C * cnt_ab);
                cnt_ab--;
            } cnt_ab >= 0 cnt_ab 0 {
                int cnt = cnt_ab / 2;
                int cnt_a = X > cnt ? X - cnt : 0;
                int cnt_b = Y > cnt ? Y - cnt : 0;
                ans = Math.min(ans, A * cnt_a + B * cnt_b + C * cnt_ab);
                cnt_ab--;
            } int cnt = cnt_ab / 2; cnt cnt_ab / 2 cnt_ab 2 int cnt_a = X > cnt ? X - cnt : 0; cnt_a X > cnt ? X - cnt : 0 X > cnt X cnt X - cnt X cnt 0 int cnt_b = Y > cnt ? Y - cnt : 0; cnt_b Y > cnt ? Y - cnt : 0 Y > cnt Y cnt Y - cnt Y cnt 0 ans = Math.min(ans, A * cnt_a + B * cnt_b + C * cnt_ab) ans Math.min(ans, A * cnt_a + B * cnt_b + C * cnt_ab) Math.min Math ans A * cnt_a + B * cnt_b + C * cnt_ab A * cnt_a + B * cnt_b + C * cnt_ab A * cnt_a A cnt_a B * cnt_b B cnt_b C * cnt_ab C cnt_ab cnt_ab-- cnt_ab out.println(ans) out.println out ans InputReader in in PrintWriter out out void debug(Object... os) {
            System.err.println(Arrays.deepToString(os));
        } debug {
            System.err.println(Arrays.deepToString(os));
        } System.err.println(Arrays.deepToString(os)) System.err.println System.err System System.err Arrays.deepToString(os) Arrays.deepToString Arrays os Object... os os static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    } InputReader BufferedReader reader; reader StringTokenizer tokenizer; tokenizer InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        } InputReader {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        } reader = new BufferedReader(new InputStreamReader(stream), 32768) reader new BufferedReader(new InputStreamReader(stream), 32768) tokenizer = null tokenizer null InputStream stream stream String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } next {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } IOException e {
                    throw new RuntimeException(e);
                } throw new RuntimeException(e); new RuntimeException(e) {
                    tokenizer = new StringTokenizer(reader.readLine());
                } tokenizer = new StringTokenizer(reader.readLine()) tokenizer new StringTokenizer(reader.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public class Main {
    static int INF = (1 << 30) - 1;
    // static long L_INF = (1L << 62) - 1;
    // static long MOD = (long) 1e9 + 7;

    static class Solver {
        int A, B, C, X, Y;

        // write your code
        void solve(InputReader in, PrintWriter out) {
            A = in.nextInt();
            B = in.nextInt();
            C = in.nextInt();
            X = in.nextInt();
            Y = in.nextInt();

            int ans = INF;
            int cnt_ab = Math.max(X, Y) * 2;
            while (cnt_ab >= 0) {
                int cnt = cnt_ab / 2;
                int cnt_a = X > cnt ? X - cnt : 0;
                int cnt_b = Y > cnt ? Y - cnt : 0;
                ans = Math.min(ans, A * cnt_a + B * cnt_b + C * cnt_ab);
                cnt_ab--;
            }
            out.println(ans);
        }

        void debug(Object... os) {
            System.err.println(Arrays.deepToString(os));
        }
    }

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

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
} public class Main {
    static int INF = (1 << 30) - 1;
    // static long L_INF = (1L << 62) - 1;
    // static long MOD = (long) 1e9 + 7;

    static class Solver {
        int A, B, C, X, Y;

        // write your code
        void solve(InputReader in, PrintWriter out) {
            A = in.nextInt();
            B = in.nextInt();
            C = in.nextInt();
            X = in.nextInt();
            Y = in.nextInt();

            int ans = INF;
            int cnt_ab = Math.max(X, Y) * 2;
            while (cnt_ab >= 0) {
                int cnt = cnt_ab / 2;
                int cnt_a = X > cnt ? X - cnt : 0;
                int cnt_b = Y > cnt ? Y - cnt : 0;
                ans = Math.min(ans, A * cnt_a + B * cnt_b + C * cnt_ab);
                cnt_ab--;
            }
            out.println(ans);
        }

        void debug(Object... os) {
            System.err.println(Arrays.deepToString(os));
        }
    }

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

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.*;

public class Main {
    static int INF = (1 << 30) - 1;
    // static long L_INF = (1L << 62) - 1;
    // static long MOD = (long) 1e9 + 7;

    static class Solver {
        int A, B, C, X, Y;

        // write your code
        void solve(InputReader in, PrintWriter out) {
            A = in.nextInt();
            B = in.nextInt();
            C = in.nextInt();
            X = in.nextInt();
            Y = in.nextInt();

            int ans = INF;
            int cnt_ab = Math.max(X, Y) * 2;
            while (cnt_ab >= 0) {
                int cnt = cnt_ab / 2;
                int cnt_a = X > cnt ? X - cnt : 0;
                int cnt_b = Y > cnt ? Y - cnt : 0;
                ans = Math.min(ans, A * cnt_a + B * cnt_b + C * cnt_ab);
                cnt_ab--;
            }
            out.println(ans);
        }

        void debug(Object... os) {
            System.err.println(Arrays.deepToString(os));
        }
    }

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

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
}
