import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long x = sc.nextLong();
        long y = sc.nextLong();
        
        long price1 = a * x + b * y;
        long price2 = a * Long.max(0, x - y) + 2 * c * y;
        long price3 = 2 * c * x + b * Long.max(0, y - x);
        long price4 = c * 2 * Long.max(x, y);
        
        long ans = Long.min(Long.min(Long.min(price4, price3), price2), price1);
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long x = sc.nextLong();
        long y = sc.nextLong();
        
        long price1 = a * x + b * y;
        long price2 = a * Long.max(0, x - y) + 2 * c * y;
        long price3 = 2 * c * x + b * Long.max(0, y - x);
        long price4 = c * 2 * Long.max(x, y);
        
        long ans = Long.min(Long.min(Long.min(price4, price3), price2), price1);
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long x = sc.nextLong();
        long y = sc.nextLong();
        
        long price1 = a * x + b * y;
        long price2 = a * Long.max(0, x - y) + 2 * c * y;
        long price3 = 2 * c * x + b * Long.max(0, y - x);
        long price4 = c * 2 * Long.max(x, y);
        
        long ans = Long.min(Long.min(Long.min(price4, price3), price2), price1);
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long x = sc.nextLong();
        long y = sc.nextLong();
        
        long price1 = a * x + b * y;
        long price2 = a * Long.max(0, x - y) + 2 * c * y;
        long price3 = 2 * c * x + b * Long.max(0, y - x);
        long price4 = c * 2 * Long.max(x, y);
        
        long ans = Long.min(Long.min(Long.min(price4, price3), price2), price1);
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long c = sc.nextLong(); c sc.nextLong() sc.nextLong sc long x = sc.nextLong(); x sc.nextLong() sc.nextLong sc long y = sc.nextLong(); y sc.nextLong() sc.nextLong sc long price1 = a * x + b * y; price1 a * x + b * y a * x a x b * y b y long price2 = a * Long.max(0, x - y) + 2 * c * y; price2 a * Long.max(0, x - y) + 2 * c * y a * Long.max(0, x - y) a Long.max(0, x - y) Long.max Long 0 x - y x y 2 * c * y 2 * c * y 2 c y long price3 = 2 * c * x + b * Long.max(0, y - x); price3 2 * c * x + b * Long.max(0, y - x) 2 * c * x 2 * c * x 2 c x b * Long.max(0, y - x) b Long.max(0, y - x) Long.max Long 0 y - x y x long price4 = c * 2 * Long.max(x, y); price4 c * 2 * Long.max(x, y) c * 2 * Long.max(x, y) c 2 Long.max(x, y) Long.max Long x y long ans = Long.min(Long.min(Long.min(price4, price3), price2), price1); ans Long.min(Long.min(Long.min(price4, price3), price2), price1) Long.min Long Long.min(Long.min(price4, price3), price2) Long.min Long Long.min(price4, price3) Long.min Long price4 price3 price2 price1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long x = sc.nextLong();
        long y = sc.nextLong();
        
        long price1 = a * x + b * y;
        long price2 = a * Long.max(0, x - y) + 2 * c * y;
        long price3 = 2 * c * x + b * Long.max(0, y - x);
        long price4 = c * 2 * Long.max(x, y);
        
        long ans = Long.min(Long.min(Long.min(price4, price3), price2), price1);
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long x = sc.nextLong();
        long y = sc.nextLong();
        
        long price1 = a * x + b * y;
        long price2 = a * Long.max(0, x - y) + 2 * c * y;
        long price3 = 2 * c * x + b * Long.max(0, y - x);
        long price4 = c * 2 * Long.max(x, y);
        
        long ans = Long.min(Long.min(Long.min(price4, price3), price2), price1);
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long x = sc.nextLong();
        long y = sc.nextLong();
        
        long price1 = a * x + b * y;
        long price2 = a * Long.max(0, x - y) + 2 * c * y;
        long price3 = 2 * c * x + b * Long.max(0, y - x);
        long price4 = c * 2 * Long.max(x, y);
        
        long ans = Long.min(Long.min(Long.min(price4, price3), price2), price1);
        System.out.println(ans);
    }
}
