import java.util.Scanner;

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();

        System.out.println(solve(A, B, C, X, Y));

        sc.close();
    }

    static int solve(int A, int B, int C, int X, int Y) {
        return Math.min(A + B, C * 2) * Math.min(X, Y) + Math.min(A, C * 2) * Math.max(0, X - Math.min(X, Y))
                + Math.min(B, C * 2) * Math.max(0, Y - Math.min(X, Y));
    }
} import java.util.Scanner; Scanner java.util 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();

        System.out.println(solve(A, B, C, X, Y));

        sc.close();
    }

    static int solve(int A, int B, int C, int X, int Y) {
        return Math.min(A + B, C * 2) * Math.min(X, Y) + Math.min(A, C * 2) * Math.max(0, X - Math.min(X, Y))
                + Math.min(B, C * 2) * Math.max(0, Y - Math.min(X, Y));
    }
} 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();

        System.out.println(solve(A, B, C, X, Y));

        sc.close();
    } 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();

        System.out.println(solve(A, B, C, X, Y));

        sc.close();
    } 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 System.out.println(solve(A, B, C, X, Y)) System.out.println System.out System System.out solve(A, B, C, X, Y) solve A B C X Y sc.close() sc.close sc String[] args args static int solve(int A, int B, int C, int X, int Y) {
        return Math.min(A + B, C * 2) * Math.min(X, Y) + Math.min(A, C * 2) * Math.max(0, X - Math.min(X, Y))
                + Math.min(B, C * 2) * Math.max(0, Y - Math.min(X, Y));
    } solve {
        return Math.min(A + B, C * 2) * Math.min(X, Y) + Math.min(A, C * 2) * Math.max(0, X - Math.min(X, Y))
                + Math.min(B, C * 2) * Math.max(0, Y - Math.min(X, Y));
    } return Math.min(A + B, C * 2) * Math.min(X, Y) + Math.min(A, C * 2) * Math.max(0, X - Math.min(X, Y))
                + Math.min(B, C * 2) * Math.max(0, Y - Math.min(X, Y)); Math.min(A + B, C * 2) * Math.min(X, Y) + Math.min(A, C * 2) * Math.max(0, X - Math.min(X, Y))
                + Math.min(B, C * 2) * Math.max(0, Y - Math.min(X, Y)) Math.min(A + B, C * 2) * Math.min(X, Y) + Math.min(A, C * 2) * Math.max(0, X - Math.min(X, Y))
                + Math.min(B, C * 2) * Math.max(0, Y - Math.min(X, Y)) Math.min(A + B, C * 2) * Math.min(X, Y) Math.min(A + B, C * 2) Math.min Math A + B A B C * 2 C 2 Math.min(X, Y) Math.min Math X Y Math.min(A, C * 2) * Math.max(0, X - Math.min(X, Y)) Math.min(A, C * 2) Math.min Math A C * 2 C 2 Math.max(0, X - Math.min(X, Y)) Math.max Math 0 X - Math.min(X, Y) X Math.min(X, Y) Math.min Math X Y Math.min(B, C * 2) * Math.max(0, Y - Math.min(X, Y)) Math.min(B, C * 2) Math.min Math B C * 2 C 2 Math.max(0, Y - Math.min(X, Y)) Math.max Math 0 Y - Math.min(X, Y) Y Math.min(X, Y) Math.min Math X Y int A A int B B int C C int X X int Y Y 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();

        System.out.println(solve(A, B, C, X, Y));

        sc.close();
    }

    static int solve(int A, int B, int C, int X, int Y) {
        return Math.min(A + B, C * 2) * Math.min(X, Y) + Math.min(A, C * 2) * Math.max(0, X - Math.min(X, Y))
                + Math.min(B, C * 2) * Math.max(0, Y - Math.min(X, Y));
    }
} 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();

        System.out.println(solve(A, B, C, X, Y));

        sc.close();
    }

    static int solve(int A, int B, int C, int X, int Y) {
        return Math.min(A + B, C * 2) * Math.min(X, Y) + Math.min(A, C * 2) * Math.max(0, X - Math.min(X, Y))
                + Math.min(B, C * 2) * Math.max(0, Y - Math.min(X, Y));
    }
} Main
import java.util.Scanner;

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();

        System.out.println(solve(A, B, C, X, Y));

        sc.close();
    }

    static int solve(int A, int B, int C, int X, int Y) {
        return Math.min(A + B, C * 2) * Math.min(X, Y) + Math.min(A, C * 2) * Math.max(0, X - Math.min(X, Y))
                + Math.min(B, C * 2) * Math.max(0, Y - Math.min(X, Y));
    }
}