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