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);
        ABC095_C solver = new ABC095_C();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC095_C {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();
            int x = in.nextInt();
            int y = in.nextInt();
            int minAB = Math.min(x, y);
            int cost = 0;
            if (a + b < 2 * c) {
                cost += a * x;
                cost += b * y;
            } else {
                cost += minAB * 2 * c;
                x -= minAB;
                y -= minAB;
                if (0 < x) {
                    if (a < c * 2) {
                        cost += a * x;
                    } else {
                        cost += c * 2 * x;
                    }
                }
                if (0 < y) {
                    if (b < c * 2) {
                        cost += b * y;
                    } else {
                        cost += c * 2 * y;
                    }
                }
            }

            out.print(cost);
        }

    }
}
 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);
        ABC095_C solver = new ABC095_C();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC095_C {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();
            int x = in.nextInt();
            int y = in.nextInt();
            int minAB = Math.min(x, y);
            int cost = 0;
            if (a + b < 2 * c) {
                cost += a * x;
                cost += b * y;
            } else {
                cost += minAB * 2 * c;
                x -= minAB;
                y -= minAB;
                if (0 < x) {
                    if (a < c * 2) {
                        cost += a * x;
                    } else {
                        cost += c * 2 * x;
                    }
                }
                if (0 < y) {
                    if (b < c * 2) {
                        cost += b * y;
                    } else {
                        cost += c * 2 * y;
                    }
                }
            }

            out.print(cost);
        }

    }
} 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);
        ABC095_C solver = new ABC095_C();
        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);
        ABC095_C solver = new ABC095_C();
        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) ABC095_C solver = new ABC095_C(); solver new ABC095_C() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class ABC095_C {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();
            int x = in.nextInt();
            int y = in.nextInt();
            int minAB = Math.min(x, y);
            int cost = 0;
            if (a + b < 2 * c) {
                cost += a * x;
                cost += b * y;
            } else {
                cost += minAB * 2 * c;
                x -= minAB;
                y -= minAB;
                if (0 < x) {
                    if (a < c * 2) {
                        cost += a * x;
                    } else {
                        cost += c * 2 * x;
                    }
                }
                if (0 < y) {
                    if (b < c * 2) {
                        cost += b * y;
                    } else {
                        cost += c * 2 * y;
                    }
                }
            }

            out.print(cost);
        }

    } ABC095_C public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();
            int x = in.nextInt();
            int y = in.nextInt();
            int minAB = Math.min(x, y);
            int cost = 0;
            if (a + b < 2 * c) {
                cost += a * x;
                cost += b * y;
            } else {
                cost += minAB * 2 * c;
                x -= minAB;
                y -= minAB;
                if (0 < x) {
                    if (a < c * 2) {
                        cost += a * x;
                    } else {
                        cost += c * 2 * x;
                    }
                }
                if (0 < y) {
                    if (b < c * 2) {
                        cost += b * y;
                    } else {
                        cost += c * 2 * y;
                    }
                }
            }

            out.print(cost);
        } solve {
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();
            int x = in.nextInt();
            int y = in.nextInt();
            int minAB = Math.min(x, y);
            int cost = 0;
            if (a + b < 2 * c) {
                cost += a * x;
                cost += b * y;
            } else {
                cost += minAB * 2 * c;
                x -= minAB;
                y -= minAB;
                if (0 < x) {
                    if (a < c * 2) {
                        cost += a * x;
                    } else {
                        cost += c * 2 * x;
                    }
                }
                if (0 < y) {
                    if (b < c * 2) {
                        cost += b * y;
                    } else {
                        cost += c * 2 * y;
                    }
                }
            }

            out.print(cost);
        } int a = in.nextInt(); a in.nextInt() in.nextInt in int b = in.nextInt(); b in.nextInt() in.nextInt in int c = in.nextInt(); c in.nextInt() in.nextInt in int x = in.nextInt(); x in.nextInt() in.nextInt in int y = in.nextInt(); y in.nextInt() in.nextInt in int minAB = Math.min(x, y); minAB Math.min(x, y) Math.min Math x y int cost = 0; cost 0 if (a + b < 2 * c) {
                cost += a * x;
                cost += b * y;
            } else {
                cost += minAB * 2 * c;
                x -= minAB;
                y -= minAB;
                if (0 < x) {
                    if (a < c * 2) {
                        cost += a * x;
                    } else {
                        cost += c * 2 * x;
                    }
                }
                if (0 < y) {
                    if (b < c * 2) {
                        cost += b * y;
                    } else {
                        cost += c * 2 * y;
                    }
                }
            } a + b < 2 * c a + b a b 2 * c 2 c {
                cost += a * x;
                cost += b * y;
            } cost += a * x cost a * x a x cost += b * y cost b * y b y {
                cost += minAB * 2 * c;
                x -= minAB;
                y -= minAB;
                if (0 < x) {
                    if (a < c * 2) {
                        cost += a * x;
                    } else {
                        cost += c * 2 * x;
                    }
                }
                if (0 < y) {
                    if (b < c * 2) {
                        cost += b * y;
                    } else {
                        cost += c * 2 * y;
                    }
                }
            } cost += minAB * 2 * c cost minAB * 2 * c minAB * 2 * c minAB 2 c x -= minAB x minAB y -= minAB y minAB if (0 < x) {
                    if (a < c * 2) {
                        cost += a * x;
                    } else {
                        cost += c * 2 * x;
                    }
                } 0 < x 0 x {
                    if (a < c * 2) {
                        cost += a * x;
                    } else {
                        cost += c * 2 * x;
                    }
                } if (a < c * 2) {
                        cost += a * x;
                    } else {
                        cost += c * 2 * x;
                    } a < c * 2 a c * 2 c 2 {
                        cost += a * x;
                    } cost += a * x cost a * x a x {
                        cost += c * 2 * x;
                    } cost += c * 2 * x cost c * 2 * x c * 2 * x c 2 x if (0 < y) {
                    if (b < c * 2) {
                        cost += b * y;
                    } else {
                        cost += c * 2 * y;
                    }
                } 0 < y 0 y {
                    if (b < c * 2) {
                        cost += b * y;
                    } else {
                        cost += c * 2 * y;
                    }
                } if (b < c * 2) {
                        cost += b * y;
                    } else {
                        cost += c * 2 * y;
                    } b < c * 2 b c * 2 c 2 {
                        cost += b * y;
                    } cost += b * y cost b * y b y {
                        cost += c * 2 * y;
                    } cost += c * 2 * y cost c * 2 * y c * 2 * y c 2 y out.print(cost) out.print out cost 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);
        ABC095_C solver = new ABC095_C();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC095_C {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();
            int x = in.nextInt();
            int y = in.nextInt();
            int minAB = Math.min(x, y);
            int cost = 0;
            if (a + b < 2 * c) {
                cost += a * x;
                cost += b * y;
            } else {
                cost += minAB * 2 * c;
                x -= minAB;
                y -= minAB;
                if (0 < x) {
                    if (a < c * 2) {
                        cost += a * x;
                    } else {
                        cost += c * 2 * x;
                    }
                }
                if (0 < y) {
                    if (b < c * 2) {
                        cost += b * y;
                    } else {
                        cost += c * 2 * y;
                    }
                }
            }

            out.print(cost);
        }

    }
} 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);
        ABC095_C solver = new ABC095_C();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC095_C {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();
            int x = in.nextInt();
            int y = in.nextInt();
            int minAB = Math.min(x, y);
            int cost = 0;
            if (a + b < 2 * c) {
                cost += a * x;
                cost += b * y;
            } else {
                cost += minAB * 2 * c;
                x -= minAB;
                y -= minAB;
                if (0 < x) {
                    if (a < c * 2) {
                        cost += a * x;
                    } else {
                        cost += c * 2 * x;
                    }
                }
                if (0 < y) {
                    if (b < c * 2) {
                        cost += b * y;
                    } else {
                        cost += c * 2 * y;
                    }
                }
            }

            out.print(cost);
        }

    }
} 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);
        ABC095_C solver = new ABC095_C();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC095_C {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();
            int x = in.nextInt();
            int y = in.nextInt();
            int minAB = Math.min(x, y);
            int cost = 0;
            if (a + b < 2 * c) {
                cost += a * x;
                cost += b * y;
            } else {
                cost += minAB * 2 * c;
                x -= minAB;
                y -= minAB;
                if (0 < x) {
                    if (a < c * 2) {
                        cost += a * x;
                    } else {
                        cost += c * 2 * x;
                    }
                }
                if (0 < y) {
                    if (b < c * 2) {
                        cost += b * y;
                    } else {
                        cost += c * 2 * y;
                    }
                }
            }

            out.print(cost);
        }

    }
}

