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 xymin = Math.min(x,y);
        long ans = xymin * Math.min(a+b,c*2);
        x -= xymin;
        y -= xymin;
        if(x == 0){
            ans += y*Math.min(b,c*2);
        }else{
            ans += x*Math.min(a,c*2);
        }
        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 xymin = Math.min(x,y);
        long ans = xymin * Math.min(a+b,c*2);
        x -= xymin;
        y -= xymin;
        if(x == 0){
            ans += y*Math.min(b,c*2);
        }else{
            ans += x*Math.min(a,c*2);
        }
        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 xymin = Math.min(x,y);
        long ans = xymin * Math.min(a+b,c*2);
        x -= xymin;
        y -= xymin;
        if(x == 0){
            ans += y*Math.min(b,c*2);
        }else{
            ans += x*Math.min(a,c*2);
        }
        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 xymin = Math.min(x,y);
        long ans = xymin * Math.min(a+b,c*2);
        x -= xymin;
        y -= xymin;
        if(x == 0){
            ans += y*Math.min(b,c*2);
        }else{
            ans += x*Math.min(a,c*2);
        }
        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 xymin = Math.min(x,y); xymin Math.min(x,y) Math.min Math x y long ans = xymin * Math.min(a+b,c*2); ans xymin * Math.min(a+b,c*2) xymin Math.min(a+b,c*2) Math.min Math a+b a b c*2 c 2 x -= xymin x xymin y -= xymin y xymin if(x == 0){
            ans += y*Math.min(b,c*2);
        }else{
            ans += x*Math.min(a,c*2);
        } x == 0 x 0 {
            ans += y*Math.min(b,c*2);
        } ans += y*Math.min(b,c*2) ans y*Math.min(b,c*2) y Math.min(b,c*2) Math.min Math b c*2 c 2 {
            ans += x*Math.min(a,c*2);
        } ans += x*Math.min(a,c*2) ans x*Math.min(a,c*2) x Math.min(a,c*2) Math.min Math a c*2 c 2 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 xymin = Math.min(x,y);
        long ans = xymin * Math.min(a+b,c*2);
        x -= xymin;
        y -= xymin;
        if(x == 0){
            ans += y*Math.min(b,c*2);
        }else{
            ans += x*Math.min(a,c*2);
        }
        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 xymin = Math.min(x,y);
        long ans = xymin * Math.min(a+b,c*2);
        x -= xymin;
        y -= xymin;
        if(x == 0){
            ans += y*Math.min(b,c*2);
        }else{
            ans += x*Math.min(a,c*2);
        }
        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 xymin = Math.min(x,y);
        long ans = xymin * Math.min(a+b,c*2);
        x -= xymin;
        y -= xymin;
        if(x == 0){
            ans += y*Math.min(b,c*2);
        }else{
            ans += x*Math.min(a,c*2);
        }
        System.out.println(ans);
    }
}