import 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();
        int price1 = Math.max(x, y) * 2 * c;
        int price2 = a * x + b * y;
        int price3;
        if (x > y)
            price3 = y * 2 * c + (x - y) * a;
        else
            price3 = x * 2 * c + (y - x) * b;
        System.out.println(Math.min(Math.min(price1, price2), price3));
    }
} import java.util.*; util.* java 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();
        int price1 = Math.max(x, y) * 2 * c;
        int price2 = a * x + b * y;
        int price3;
        if (x > y)
            price3 = y * 2 * c + (x - y) * a;
        else
            price3 = x * 2 * c + (y - x) * b;
        System.out.println(Math.min(Math.min(price1, price2), price3));
    }
} 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 = Math.max(x, y) * 2 * c;
        int price2 = a * x + b * y;
        int price3;
        if (x > y)
            price3 = y * 2 * c + (x - y) * a;
        else
            price3 = x * 2 * c + (y - x) * b;
        System.out.println(Math.min(Math.min(price1, price2), price3));
    } 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 = Math.max(x, y) * 2 * c;
        int price2 = a * x + b * y;
        int price3;
        if (x > y)
            price3 = y * 2 * c + (x - y) * a;
        else
            price3 = x * 2 * c + (y - x) * b;
        System.out.println(Math.min(Math.min(price1, price2), price3));
    } 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 = Math.max(x, y) * 2 * c; price1 Math.max(x, y) * 2 * c Math.max(x, y) * 2 * c Math.max(x, y) Math.max Math x y 2 c int price2 = a * x + b * y; price2 a * x + b * y a * x a x b * y b y int price3; price3 if (x > y)
            price3 = y * 2 * c + (x - y) * a;
        else
            price3 = x * 2 * c + (y - x) * b; x > y x y price3 = y * 2 * c + (x - y) * a price3 y * 2 * c + (x - y) * a y * 2 * c y * 2 * c y 2 c (x - y) * a (x - y) x y a price3 = x * 2 * c + (y - x) * b price3 x * 2 * c + (y - x) * b x * 2 * c x * 2 * c x 2 c (y - x) * b (y - x) y x b System.out.println(Math.min(Math.min(price1, price2), price3)) System.out.println System.out System System.out Math.min(Math.min(price1, price2), price3) Math.min Math Math.min(price1, price2) Math.min Math price1 price2 price3 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();
        int price1 = Math.max(x, y) * 2 * c;
        int price2 = a * x + b * y;
        int price3;
        if (x > y)
            price3 = y * 2 * c + (x - y) * a;
        else
            price3 = x * 2 * c + (y - x) * b;
        System.out.println(Math.min(Math.min(price1, price2), price3));
    }
} 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();
        int price1 = Math.max(x, y) * 2 * c;
        int price2 = a * x + b * y;
        int price3;
        if (x > y)
            price3 = y * 2 * c + (x - y) * a;
        else
            price3 = x * 2 * c + (y - x) * b;
        System.out.println(Math.min(Math.min(price1, price2), price3));
    }
} Main
import 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();
        int price1 = Math.max(x, y) * 2 * c;
        int price2 = a * x + b * y;
        int price3;
        if (x > y)
            price3 = y * 2 * c + (x - y) * a;
        else
            price3 = x * 2 * c + (y - x) * b;
        System.out.println(Math.min(Math.min(price1, price2), price3));
    }
}
