import java.util.*;

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();
        int price1;
        int price2;
        if (X > Y) {
            price1 = (C * 2 * Y) + (A * (X - Y));
            price2 = C * 2 * X;
        } else {
            price1 = (C * 2 * X) + (B * (Y - X));
            price2 = C * 2 * Y;
        }
        int price3 = A * X + B * Y;
        int ans = Math.min(price1, price2);
        ans = Math.min(ans, price3);
        System.out.println(+ans);
    }

} import java.util.*; util.* java 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();
        int price1;
        int price2;
        if (X > Y) {
            price1 = (C * 2 * Y) + (A * (X - Y));
            price2 = C * 2 * X;
        } else {
            price1 = (C * 2 * X) + (B * (Y - X));
            price2 = C * 2 * Y;
        }
        int price3 = A * X + B * Y;
        int ans = Math.min(price1, price2);
        ans = Math.min(ans, price3);
        System.out.println(+ans);
    }

} 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();
        int price1;
        int price2;
        if (X > Y) {
            price1 = (C * 2 * Y) + (A * (X - Y));
            price2 = C * 2 * X;
        } else {
            price1 = (C * 2 * X) + (B * (Y - X));
            price2 = C * 2 * Y;
        }
        int price3 = A * X + B * Y;
        int ans = Math.min(price1, price2);
        ans = Math.min(ans, price3);
        System.out.println(+ans);
    } 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();
        int price1;
        int price2;
        if (X > Y) {
            price1 = (C * 2 * Y) + (A * (X - Y));
            price2 = C * 2 * X;
        } else {
            price1 = (C * 2 * X) + (B * (Y - X));
            price2 = C * 2 * Y;
        }
        int price3 = A * X + B * Y;
        int ans = Math.min(price1, price2);
        ans = Math.min(ans, price3);
        System.out.println(+ans);
    } 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 int price1; price1 int price2; price2 if (X > Y) {
            price1 = (C * 2 * Y) + (A * (X - Y));
            price2 = C * 2 * X;
        } else {
            price1 = (C * 2 * X) + (B * (Y - X));
            price2 = C * 2 * Y;
        } X > Y X Y {
            price1 = (C * 2 * Y) + (A * (X - Y));
            price2 = C * 2 * X;
        } price1 = (C * 2 * Y) + (A * (X - Y)) price1 (C * 2 * Y) + (A * (X - Y)) (C * 2 * Y) C * 2 * Y C 2 Y (A * (X - Y)) A (X - Y) X Y price2 = C * 2 * X price2 C * 2 * X C * 2 * X C 2 X {
            price1 = (C * 2 * X) + (B * (Y - X));
            price2 = C * 2 * Y;
        } price1 = (C * 2 * X) + (B * (Y - X)) price1 (C * 2 * X) + (B * (Y - X)) (C * 2 * X) C * 2 * X C 2 X (B * (Y - X)) B (Y - X) Y X price2 = C * 2 * Y price2 C * 2 * Y C * 2 * Y C 2 Y int price3 = A * X + B * Y; price3 A * X + B * Y A * X A X B * Y B Y int ans = Math.min(price1, price2); ans Math.min(price1, price2) Math.min Math price1 price2 ans = Math.min(ans, price3) ans Math.min(ans, price3) Math.min Math ans price3 System.out.println(+ans) System.out.println System.out System System.out +ans ans String[] args args
import java.util.*;

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();
        int price1;
        int price2;
        if (X > Y) {
            price1 = (C * 2 * Y) + (A * (X - Y));
            price2 = C * 2 * X;
        } else {
            price1 = (C * 2 * X) + (B * (Y - X));
            price2 = C * 2 * Y;
        }
        int price3 = A * X + B * Y;
        int ans = Math.min(price1, price2);
        ans = Math.min(ans, price3);
        System.out.println(+ans);
    }

}