import java.util.Scanner;

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 ans = Integer.MAX_VALUE;
        for (int i = 0; i <= Math.max(x, y); i++) {
            int xx = x - i;
            if(xx < 0) {
                xx = 0;
            }
            int yy = y - i;
            if(yy < 0) {
                yy = 0;
            }
            int tmp = (c * 2) * i + (a * xx) + (b * yy);
            ans = Math.min(tmp, ans);
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner 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 ans = Integer.MAX_VALUE;
        for (int i = 0; i <= Math.max(x, y); i++) {
            int xx = x - i;
            if(xx < 0) {
                xx = 0;
            }
            int yy = y - i;
            if(yy < 0) {
                yy = 0;
            }
            int tmp = (c * 2) * i + (a * xx) + (b * yy);
            ans = Math.min(tmp, 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();
        int ans = Integer.MAX_VALUE;
        for (int i = 0; i <= Math.max(x, y); i++) {
            int xx = x - i;
            if(xx < 0) {
                xx = 0;
            }
            int yy = y - i;
            if(yy < 0) {
                yy = 0;
            }
            int tmp = (c * 2) * i + (a * xx) + (b * yy);
            ans = Math.min(tmp, 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();
        int ans = Integer.MAX_VALUE;
        for (int i = 0; i <= Math.max(x, y); i++) {
            int xx = x - i;
            if(xx < 0) {
                xx = 0;
            }
            int yy = y - i;
            if(yy < 0) {
                yy = 0;
            }
            int tmp = (c * 2) * i + (a * xx) + (b * yy);
            ans = Math.min(tmp, 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 int ans = Integer.MAX_VALUE; ans Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 0; i <= Math.max(x, y); i++) {
            int xx = x - i;
            if(xx < 0) {
                xx = 0;
            }
            int yy = y - i;
            if(yy < 0) {
                yy = 0;
            }
            int tmp = (c * 2) * i + (a * xx) + (b * yy);
            ans = Math.min(tmp, ans);
        } int i = 0; int i = 0; i 0 i <= Math.max(x, y) i Math.max(x, y) Math.max Math x y i++ i++ i {
            int xx = x - i;
            if(xx < 0) {
                xx = 0;
            }
            int yy = y - i;
            if(yy < 0) {
                yy = 0;
            }
            int tmp = (c * 2) * i + (a * xx) + (b * yy);
            ans = Math.min(tmp, ans);
        } {
            int xx = x - i;
            if(xx < 0) {
                xx = 0;
            }
            int yy = y - i;
            if(yy < 0) {
                yy = 0;
            }
            int tmp = (c * 2) * i + (a * xx) + (b * yy);
            ans = Math.min(tmp, ans);
        } int xx = x - i; xx x - i x i if(xx < 0) {
                xx = 0;
            } xx < 0 xx 0 {
                xx = 0;
            } xx = 0 xx 0 int yy = y - i; yy y - i y i if(yy < 0) {
                yy = 0;
            } yy < 0 yy 0 {
                yy = 0;
            } yy = 0 yy 0 int tmp = (c * 2) * i + (a * xx) + (b * yy); tmp (c * 2) * i + (a * xx) + (b * yy) (c * 2) * i + (a * xx) + (b * yy) (c * 2) * i (c * 2) c 2 i (a * xx) a xx (b * yy) b yy ans = Math.min(tmp, ans) ans Math.min(tmp, ans) Math.min Math tmp 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();
        int ans = Integer.MAX_VALUE;
        for (int i = 0; i <= Math.max(x, y); i++) {
            int xx = x - i;
            if(xx < 0) {
                xx = 0;
            }
            int yy = y - i;
            if(yy < 0) {
                yy = 0;
            }
            int tmp = (c * 2) * i + (a * xx) + (b * yy);
            ans = Math.min(tmp, 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();
        int ans = Integer.MAX_VALUE;
        for (int i = 0; i <= Math.max(x, y); i++) {
            int xx = x - i;
            if(xx < 0) {
                xx = 0;
            }
            int yy = y - i;
            if(yy < 0) {
                yy = 0;
            }
            int tmp = (c * 2) * i + (a * xx) + (b * yy);
            ans = Math.min(tmp, ans);
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

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 ans = Integer.MAX_VALUE;
        for (int i = 0; i <= Math.max(x, y); i++) {
            int xx = x - i;
            if(xx < 0) {
                xx = 0;
            }
            int yy = y - i;
            if(yy < 0) {
                yy = 0;
            }
            int tmp = (c * 2) * i + (a * xx) + (b * yy);
            ans = Math.min(tmp, ans);
        }
        System.out.println(ans);
    }
}