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 max = Math.max(x,y);
        int min = Math.min(x,y);
        
        int ansA = a * x + b * y;
        int ansB = 2 * c * min + a * (x-min) + b * (y-min);
        int ansC = 2 * c * max;
        int ans = Math.min( Math.min(ansA,ansB),ansC );
        System.out.println(ans);
    }
} 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 max = Math.max(x,y);
        int min = Math.min(x,y);
        
        int ansA = a * x + b * y;
        int ansB = 2 * c * min + a * (x-min) + b * (y-min);
        int ansC = 2 * c * max;
        int ans = Math.min( Math.min(ansA,ansB),ansC );
        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 max = Math.max(x,y);
        int min = Math.min(x,y);
        
        int ansA = a * x + b * y;
        int ansB = 2 * c * min + a * (x-min) + b * (y-min);
        int ansC = 2 * c * max;
        int ans = Math.min( Math.min(ansA,ansB),ansC );
        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 max = Math.max(x,y);
        int min = Math.min(x,y);
        
        int ansA = a * x + b * y;
        int ansB = 2 * c * min + a * (x-min) + b * (y-min);
        int ansC = 2 * c * max;
        int ans = Math.min( Math.min(ansA,ansB),ansC );
        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 max = Math.max(x,y); max Math.max(x,y) Math.max Math x y int min = Math.min(x,y); min Math.min(x,y) Math.min Math x y int ansA = a * x + b * y; ansA a * x + b * y a * x a x b * y b y int ansB = 2 * c * min + a * (x-min) + b * (y-min); ansB 2 * c * min + a * (x-min) + b * (y-min) 2 * c * min + a * (x-min) + b * (y-min) 2 * c * min 2 * c * min 2 c min a * (x-min) a (x-min) x min b * (y-min) b (y-min) y min int ansC = 2 * c * max; ansC 2 * c * max 2 * c * max 2 c max int ans = Math.min( Math.min(ansA,ansB),ansC ); ans Math.min( Math.min(ansA,ansB),ansC ) Math.min Math Math.min(ansA,ansB) Math.min Math ansA ansB ansC 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);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();
        int max = Math.max(x,y);
        int min = Math.min(x,y);
        
        int ansA = a * x + b * y;
        int ansB = 2 * c * min + a * (x-min) + b * (y-min);
        int ansC = 2 * c * max;
        int ans = Math.min( Math.min(ansA,ansB),ansC );
        System.out.println(ans);
    }
} 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 max = Math.max(x,y);
        int min = Math.min(x,y);
        
        int ansA = a * x + b * y;
        int ansB = 2 * c * min + a * (x-min) + b * (y-min);
        int ansC = 2 * c * max;
        int ans = Math.min( Math.min(ansA,ansB),ansC );
        System.out.println(ans);
    }
} 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 max = Math.max(x,y);
        int min = Math.min(x,y);
        
        int ansA = a * x + b * y;
        int ansB = 2 * c * min + a * (x-min) + b * (y-min);
        int ansC = 2 * c * max;
        int ans = Math.min( Math.min(ansA,ansB),ansC );
        System.out.println(ans);
    }
}