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();

        long ans = Integer.MAX_VALUE;
        for(int i=0;i<=x;i++){
            long now = a*i;
            now += (x-i)*2*c;
            int remB = Math.max(0,y-(x-i));
            now += Math.min(remB*b,remB*2*c);
            ans = Math.min(now,ans);
        }
        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();

        long ans = Integer.MAX_VALUE;
        for(int i=0;i<=x;i++){
            long now = a*i;
            now += (x-i)*2*c;
            int remB = Math.max(0,y-(x-i));
            now += Math.min(remB*b,remB*2*c);
            ans = Math.min(now,ans);
        }
        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();

        long ans = Integer.MAX_VALUE;
        for(int i=0;i<=x;i++){
            long now = a*i;
            now += (x-i)*2*c;
            int remB = Math.max(0,y-(x-i));
            now += Math.min(remB*b,remB*2*c);
            ans = Math.min(now,ans);
        }
        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 = Integer.MAX_VALUE;
        for(int i=0;i<=x;i++){
            long now = a*i;
            now += (x-i)*2*c;
            int remB = Math.max(0,y-(x-i));
            now += Math.min(remB*b,remB*2*c);
            ans = Math.min(now,ans);
        }
        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 = Integer.MAX_VALUE; ans Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i=0;i<=x;i++){
            long now = a*i;
            now += (x-i)*2*c;
            int remB = Math.max(0,y-(x-i));
            now += Math.min(remB*b,remB*2*c);
            ans = Math.min(now,ans);
        } int i=0; int i=0; i 0 i<=x i x i++ i++ i {
            long now = a*i;
            now += (x-i)*2*c;
            int remB = Math.max(0,y-(x-i));
            now += Math.min(remB*b,remB*2*c);
            ans = Math.min(now,ans);
        } {
            long now = a*i;
            now += (x-i)*2*c;
            int remB = Math.max(0,y-(x-i));
            now += Math.min(remB*b,remB*2*c);
            ans = Math.min(now,ans);
        } long now = a*i; now a*i a i now += (x-i)*2*c now (x-i)*2*c (x-i)*2*c (x-i) x i 2 c int remB = Math.max(0,y-(x-i)); remB Math.max(0,y-(x-i)) Math.max Math 0 y-(x-i) y (x-i) x i now += Math.min(remB*b,remB*2*c) now Math.min(remB*b,remB*2*c) Math.min Math remB*b remB b remB*2*c remB*2*c remB 2 c ans = Math.min(now,ans) ans Math.min(now,ans) Math.min Math now ans 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();

        long ans = Integer.MAX_VALUE;
        for(int i=0;i<=x;i++){
            long now = a*i;
            now += (x-i)*2*c;
            int remB = Math.max(0,y-(x-i));
            now += Math.min(remB*b,remB*2*c);
            ans = Math.min(now,ans);
        }
        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();

        long ans = Integer.MAX_VALUE;
        for(int i=0;i<=x;i++){
            long now = a*i;
            now += (x-i)*2*c;
            int remB = Math.max(0,y-(x-i));
            now += Math.min(remB*b,remB*2*c);
            ans = Math.min(now,ans);
        }
        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();

        long ans = Integer.MAX_VALUE;
        for(int i=0;i<=x;i++){
            long now = a*i;
            now += (x-i)*2*c;
            int remB = Math.max(0,y-(x-i));
            now += Math.min(remB*b,remB*2*c);
            ans = Math.min(now,ans);
        }
        System.out.println(ans);
    }
}