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 mikit
 */
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 = in.nextInt(), b = in.nextInt(), c = in.nextInt(), x = in.nextInt(), y = in.nextInt();
            int ans = 0;
            if (a + b > c * 2) {
                int ab = Math.min(x, y);
                ans += ab * c * 2;
                x -= ab;
                y -= ab;
            }
            if (a > c * 2) {
                ans += x * c * 2;
            } else {
                ans += x * a;
            }
            if (b > c * 2) {
                ans += y * c * 2;
            } else {
                ans += y * b;
            }
            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 = in.nextInt(), b = in.nextInt(), c = in.nextInt(), x = in.nextInt(), y = in.nextInt();
            int ans = 0;
            if (a + b > c * 2) {
                int ab = Math.min(x, y);
                ans += ab * c * 2;
                x -= ab;
                y -= ab;
            }
            if (a > c * 2) {
                ans += x * c * 2;
            } else {
                ans += x * a;
            }
            if (b > c * 2) {
                ans += y * c * 2;
            } else {
                ans += y * b;
            }
            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 = in.nextInt(), b = in.nextInt(), c = in.nextInt(), x = in.nextInt(), y = in.nextInt();
            int ans = 0;
            if (a + b > c * 2) {
                int ab = Math.min(x, y);
                ans += ab * c * 2;
                x -= ab;
                y -= ab;
            }
            if (a > c * 2) {
                ans += x * c * 2;
            } else {
                ans += x * a;
            }
            if (b > c * 2) {
                ans += y * c * 2;
            } else {
                ans += y * b;
            }
            out.println(ans);
        }

    } CHalfAndHalf public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt(), b = in.nextInt(), c = in.nextInt(), x = in.nextInt(), y = in.nextInt();
            int ans = 0;
            if (a + b > c * 2) {
                int ab = Math.min(x, y);
                ans += ab * c * 2;
                x -= ab;
                y -= ab;
            }
            if (a > c * 2) {
                ans += x * c * 2;
            } else {
                ans += x * a;
            }
            if (b > c * 2) {
                ans += y * c * 2;
            } else {
                ans += y * b;
            }
            out.println(ans);
        } solve {
            int a = in.nextInt(), b = in.nextInt(), c = in.nextInt(), x = in.nextInt(), y = in.nextInt();
            int ans = 0;
            if (a + b > c * 2) {
                int ab = Math.min(x, y);
                ans += ab * c * 2;
                x -= ab;
                y -= ab;
            }
            if (a > c * 2) {
                ans += x * c * 2;
            } else {
                ans += x * a;
            }
            if (b > c * 2) {
                ans += y * c * 2;
            } else {
                ans += y * b;
            }
            out.println(ans);
        } int 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 = 0; ans 0 if (a + b > c * 2) {
                int ab = Math.min(x, y);
                ans += ab * c * 2;
                x -= ab;
                y -= ab;
            } a + b > c * 2 a + b a b c * 2 c 2 {
                int ab = Math.min(x, y);
                ans += ab * c * 2;
                x -= ab;
                y -= ab;
            } int ab = Math.min(x, y); ab Math.min(x, y) Math.min Math x y ans += ab * c * 2 ans ab * c * 2 ab * c * 2 ab c 2 x -= ab x ab y -= ab y ab if (a > c * 2) {
                ans += x * c * 2;
            } else {
                ans += x * a;
            } a > c * 2 a c * 2 c 2 {
                ans += x * c * 2;
            } ans += x * c * 2 ans x * c * 2 x * c * 2 x c 2 {
                ans += x * a;
            } ans += x * a ans x * a x a if (b > c * 2) {
                ans += y * c * 2;
            } else {
                ans += y * b;
            } b > c * 2 b c * 2 c 2 {
                ans += y * c * 2;
            } ans += y * c * 2 ans y * c * 2 y * c * 2 y c 2 {
                ans += y * b;
            } ans += y * b ans y * b y b 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 = in.nextInt(), b = in.nextInt(), c = in.nextInt(), x = in.nextInt(), y = in.nextInt();
            int ans = 0;
            if (a + b > c * 2) {
                int ab = Math.min(x, y);
                ans += ab * c * 2;
                x -= ab;
                y -= ab;
            }
            if (a > c * 2) {
                ans += x * c * 2;
            } else {
                ans += x * a;
            }
            if (b > c * 2) {
                ans += y * c * 2;
            } else {
                ans += y * b;
            }
            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 = in.nextInt(), b = in.nextInt(), c = in.nextInt(), x = in.nextInt(), y = in.nextInt();
            int ans = 0;
            if (a + b > c * 2) {
                int ab = Math.min(x, y);
                ans += ab * c * 2;
                x -= ab;
                y -= ab;
            }
            if (a > c * 2) {
                ans += x * c * 2;
            } else {
                ans += x * a;
            }
            if (b > c * 2) {
                ans += y * c * 2;
            } else {
                ans += y * b;
            }
            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
 *
 * @author mikit
 */
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 = in.nextInt(), b = in.nextInt(), c = in.nextInt(), x = in.nextInt(), y = in.nextInt();
            int ans = 0;
            if (a + b > c * 2) {
                int ab = Math.min(x, y);
                ans += ab * c * 2;
                x -= ab;
                y -= ab;
            }
            if (a > c * 2) {
                ans += x * c * 2;
            } else {
                ans += x * a;
            }
            if (b > c * 2) {
                ans += y * c * 2;
            } else {
                ans += y * b;
            }
            out.println(ans);
        }

    }
}

