import java.util.*;

import static java.lang.System.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();

        // Cだけ
        long priceOnlyC = Math.max(X, Y) * 2 * C;

        // C + 残り A or B
        long priceCwithAB = Math.min(X, Y) * 2 * C;
        if (X > Y) {
            int xTmp = X - Y;
            priceCwithAB += xTmp * A;
        } else {
            int yTmp = Y - X;
            priceCwithAB += yTmp * B;
        }

        // C使わない
        long priceOnlyAB = A * X + B * Y;

        out.println(Math.min(priceOnlyC, Math.min(priceCwithAB, priceOnlyAB)));
    }
} import java.util.*; util.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();

        // Cだけ
        long priceOnlyC = Math.max(X, Y) * 2 * C;

        // C + 残り A or B
        long priceCwithAB = Math.min(X, Y) * 2 * C;
        if (X > Y) {
            int xTmp = X - Y;
            priceCwithAB += xTmp * A;
        } else {
            int yTmp = Y - X;
            priceCwithAB += yTmp * B;
        }

        // C使わない
        long priceOnlyAB = A * X + B * Y;

        out.println(Math.min(priceOnlyC, Math.min(priceCwithAB, priceOnlyAB)));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();

        // Cだけ
        long priceOnlyC = Math.max(X, Y) * 2 * C;

        // C + 残り A or B
        long priceCwithAB = Math.min(X, Y) * 2 * C;
        if (X > Y) {
            int xTmp = X - Y;
            priceCwithAB += xTmp * A;
        } else {
            int yTmp = Y - X;
            priceCwithAB += yTmp * B;
        }

        // C使わない
        long priceOnlyAB = A * X + B * Y;

        out.println(Math.min(priceOnlyC, Math.min(priceCwithAB, priceOnlyAB)));
    } main {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();

        // Cだけ
        long priceOnlyC = Math.max(X, Y) * 2 * C;

        // C + 残り A or B
        long priceCwithAB = Math.min(X, Y) * 2 * C;
        if (X > Y) {
            int xTmp = X - Y;
            priceCwithAB += xTmp * A;
        } else {
            int yTmp = Y - X;
            priceCwithAB += yTmp * B;
        }

        // C使わない
        long priceOnlyAB = A * X + B * Y;

        out.println(Math.min(priceOnlyC, Math.min(priceCwithAB, priceOnlyAB)));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc int Y = sc.nextInt(); Y sc.nextInt() sc.nextInt sc long priceOnlyC = Math.max(X, Y) * 2 * C; priceOnlyC Math.max(X, Y) * 2 * C Math.max(X, Y) * 2 * C Math.max(X, Y) Math.max Math X Y 2 C long priceCwithAB = Math.min(X, Y) * 2 * C; priceCwithAB Math.min(X, Y) * 2 * C Math.min(X, Y) * 2 * C Math.min(X, Y) Math.min Math X Y 2 C if (X > Y) {
            int xTmp = X - Y;
            priceCwithAB += xTmp * A;
        } else {
            int yTmp = Y - X;
            priceCwithAB += yTmp * B;
        } X > Y X Y {
            int xTmp = X - Y;
            priceCwithAB += xTmp * A;
        } int xTmp = X - Y; xTmp X - Y X Y priceCwithAB += xTmp * A priceCwithAB xTmp * A xTmp A {
            int yTmp = Y - X;
            priceCwithAB += yTmp * B;
        } int yTmp = Y - X; yTmp Y - X Y X priceCwithAB += yTmp * B priceCwithAB yTmp * B yTmp B long priceOnlyAB = A * X + B * Y; priceOnlyAB A * X + B * Y A * X A X B * Y B Y out.println(Math.min(priceOnlyC, Math.min(priceCwithAB, priceOnlyAB))) out.println out Math.min(priceOnlyC, Math.min(priceCwithAB, priceOnlyAB)) Math.min Math priceOnlyC Math.min(priceCwithAB, priceOnlyAB) Math.min Math priceCwithAB priceOnlyAB String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();

        // Cだけ
        long priceOnlyC = Math.max(X, Y) * 2 * C;

        // C + 残り A or B
        long priceCwithAB = Math.min(X, Y) * 2 * C;
        if (X > Y) {
            int xTmp = X - Y;
            priceCwithAB += xTmp * A;
        } else {
            int yTmp = Y - X;
            priceCwithAB += yTmp * B;
        }

        // C使わない
        long priceOnlyAB = A * X + B * Y;

        out.println(Math.min(priceOnlyC, Math.min(priceCwithAB, priceOnlyAB)));
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();

        // Cだけ
        long priceOnlyC = Math.max(X, Y) * 2 * C;

        // C + 残り A or B
        long priceCwithAB = Math.min(X, Y) * 2 * C;
        if (X > Y) {
            int xTmp = X - Y;
            priceCwithAB += xTmp * A;
        } else {
            int yTmp = Y - X;
            priceCwithAB += yTmp * B;
        }

        // C使わない
        long priceOnlyAB = A * X + B * Y;

        out.println(Math.min(priceOnlyC, Math.min(priceCwithAB, priceOnlyAB)));
    }
} Main
import java.util.*;

import static java.lang.System.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();

        // Cだけ
        long priceOnlyC = Math.max(X, Y) * 2 * C;

        // C + 残り A or B
        long priceCwithAB = Math.min(X, Y) * 2 * C;
        if (X > Y) {
            int xTmp = X - Y;
            priceCwithAB += xTmp * A;
        } else {
            int yTmp = Y - X;
            priceCwithAB += yTmp * B;
        }

        // C使わない
        long priceOnlyAB = A * X + B * Y;

        out.println(Math.min(priceOnlyC, Math.min(priceCwithAB, priceOnlyAB)));
    }
}