import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        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();
        long ans = 0;
        int min = Math.min(x,y);
        if(a+b >= c*2){
            ans += min * 2 * c;
            
        }else{
            ans += min * (a + b);
        }
        x -= min;
        y -= min;
        if(x > 0){
            ans += Math.min(a,c*2) * x;
        }else if(y > 0){
            ans += Math.min(b,c*2) * y;
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        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();
        long ans = 0;
        int min = Math.min(x,y);
        if(a+b >= c*2){
            ans += min * 2 * c;
            
        }else{
            ans += min * (a + b);
        }
        x -= min;
        y -= min;
        if(x > 0){
            ans += Math.min(a,c*2) * x;
        }else if(y > 0){
            ans += Math.min(b,c*2) * y;
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) throws Exception {
        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();
        long ans = 0;
        int min = Math.min(x,y);
        if(a+b >= c*2){
            ans += min * 2 * c;
            
        }else{
            ans += min * (a + b);
        }
        x -= min;
        y -= min;
        if(x > 0){
            ans += Math.min(a,c*2) * x;
        }else if(y > 0){
            ans += Math.min(b,c*2) * y;
        }
        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();
        long ans = 0;
        int min = Math.min(x,y);
        if(a+b >= c*2){
            ans += min * 2 * c;
            
        }else{
            ans += min * (a + b);
        }
        x -= min;
        y -= min;
        if(x > 0){
            ans += Math.min(a,c*2) * x;
        }else if(y > 0){
            ans += Math.min(b,c*2) * y;
        }
        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 long ans = 0; ans 0 int min = Math.min(x,y); min Math.min(x,y) Math.min Math x y if(a+b >= c*2){
            ans += min * 2 * c;
            
        }else{
            ans += min * (a + b);
        } a+b >= c*2 a+b a b c*2 c 2 {
            ans += min * 2 * c;
            
        } ans += min * 2 * c ans min * 2 * c min * 2 * c min 2 c {
            ans += min * (a + b);
        } ans += min * (a + b) ans min * (a + b) min (a + b) a b x -= min x min y -= min y min if(x > 0){
            ans += Math.min(a,c*2) * x;
        }else if(y > 0){
            ans += Math.min(b,c*2) * y;
        } x > 0 x 0 {
            ans += Math.min(a,c*2) * x;
        } ans += Math.min(a,c*2) * x ans Math.min(a,c*2) * x Math.min(a,c*2) Math.min Math a c*2 c 2 x if(y > 0){
            ans += Math.min(b,c*2) * y;
        } y > 0 y 0 {
            ans += Math.min(b,c*2) * y;
        } ans += Math.min(b,c*2) * y ans Math.min(b,c*2) * y Math.min(b,c*2) Math.min Math b c*2 c 2 y 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 {
        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();
        long ans = 0;
        int min = Math.min(x,y);
        if(a+b >= c*2){
            ans += min * 2 * c;
            
        }else{
            ans += min * (a + b);
        }
        x -= min;
        y -= min;
        if(x > 0){
            ans += Math.min(a,c*2) * x;
        }else if(y > 0){
            ans += Math.min(b,c*2) * y;
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        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();
        long ans = 0;
        int min = Math.min(x,y);
        if(a+b >= c*2){
            ans += min * 2 * c;
            
        }else{
            ans += min * (a + b);
        }
        x -= min;
        y -= min;
        if(x > 0){
            ans += Math.min(a,c*2) * x;
        }else if(y > 0){
            ans += Math.min(b,c*2) * y;
        }
        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        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();
        long ans = 0;
        int min = Math.min(x,y);
        if(a+b >= c*2){
            ans += min * 2 * c;
            
        }else{
            ans += min * (a + b);
        }
        x -= min;
        y -= min;
        if(x > 0){
            ans += Math.min(a,c*2) * x;
        }else if(y > 0){
            ans += Math.min(b,c*2) * y;
        }
        System.out.println(ans);
    }
}
