import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        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();
        
        if (a + b <= c*2) {
            System.out.println(a*x+b*y);
            return;
        }
        
        int tmp = Math.min(x,y);
        
        int tmp2 = c * tmp * 2;
        
        int tmp3 = a * (x-tmp);
        int tmp4 = b * (y-tmp);
        
        int tmp5 = Math.max(x,y) * c * 2;
        
        int ans = Math.min(tmp5, tmp2+tmp3+tmp4);
        
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        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();
        
        if (a + b <= c*2) {
            System.out.println(a*x+b*y);
            return;
        }
        
        int tmp = Math.min(x,y);
        
        int tmp2 = c * tmp * 2;
        
        int tmp3 = a * (x-tmp);
        int tmp4 = b * (y-tmp);
        
        int tmp5 = Math.max(x,y) * c * 2;
        
        int ans = Math.min(tmp5, tmp2+tmp3+tmp4);
        
        System.out.println(ans);
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        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();
        
        if (a + b <= c*2) {
            System.out.println(a*x+b*y);
            return;
        }
        
        int tmp = Math.min(x,y);
        
        int tmp2 = c * tmp * 2;
        
        int tmp3 = a * (x-tmp);
        int tmp4 = b * (y-tmp);
        
        int tmp5 = Math.max(x,y) * c * 2;
        
        int ans = Math.min(tmp5, tmp2+tmp3+tmp4);
        
        System.out.println(ans);
    } main {
        // Your code here!
        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();
        
        if (a + b <= c*2) {
            System.out.println(a*x+b*y);
            return;
        }
        
        int tmp = Math.min(x,y);
        
        int tmp2 = c * tmp * 2;
        
        int tmp3 = a * (x-tmp);
        int tmp4 = b * (y-tmp);
        
        int tmp5 = Math.max(x,y) * c * 2;
        
        int ans = Math.min(tmp5, tmp2+tmp3+tmp4);
        
        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 if (a + b <= c*2) {
            System.out.println(a*x+b*y);
            return;
        } a + b <= c*2 a + b a b c*2 c 2 {
            System.out.println(a*x+b*y);
            return;
        } System.out.println(a*x+b*y) System.out.println System.out System System.out a*x+b*y a*x a x b*y b y return; int tmp = Math.min(x,y); tmp Math.min(x,y) Math.min Math x y int tmp2 = c * tmp * 2; tmp2 c * tmp * 2 c * tmp * 2 c tmp 2 int tmp3 = a * (x-tmp); tmp3 a * (x-tmp) a (x-tmp) x tmp int tmp4 = b * (y-tmp); tmp4 b * (y-tmp) b (y-tmp) y tmp int tmp5 = Math.max(x,y) * c * 2; tmp5 Math.max(x,y) * c * 2 Math.max(x,y) * c * 2 Math.max(x,y) Math.max Math x y c 2 int ans = Math.min(tmp5, tmp2+tmp3+tmp4); ans Math.min(tmp5, tmp2+tmp3+tmp4) Math.min Math tmp5 tmp2+tmp3+tmp4 tmp2+tmp3+tmp4 tmp2 tmp3 tmp4 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) throws Exception {
        // Your code here!
        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();
        
        if (a + b <= c*2) {
            System.out.println(a*x+b*y);
            return;
        }
        
        int tmp = Math.min(x,y);
        
        int tmp2 = c * tmp * 2;
        
        int tmp3 = a * (x-tmp);
        int tmp4 = b * (y-tmp);
        
        int tmp5 = Math.max(x,y) * c * 2;
        
        int ans = Math.min(tmp5, tmp2+tmp3+tmp4);
        
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        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();
        
        if (a + b <= c*2) {
            System.out.println(a*x+b*y);
            return;
        }
        
        int tmp = Math.min(x,y);
        
        int tmp2 = c * tmp * 2;
        
        int tmp3 = a * (x-tmp);
        int tmp4 = b * (y-tmp);
        
        int tmp5 = Math.max(x,y) * c * 2;
        
        int ans = Math.min(tmp5, tmp2+tmp3+tmp4);
        
        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        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();
        
        if (a + b <= c*2) {
            System.out.println(a*x+b*y);
            return;
        }
        
        int tmp = Math.min(x,y);
        
        int tmp2 = c * tmp * 2;
        
        int tmp3 = a * (x-tmp);
        int tmp4 = b * (y-tmp);
        
        int tmp5 = Math.max(x,y) * c * 2;
        
        int ans = Math.min(tmp5, tmp2+tmp3+tmp4);
        
        System.out.println(ans);
    }
}