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 sum = 0;
        if((a+b)/2 >= c){
            if(x == y){
                sum = x * 2 *c;
            } else if (x > y) {
                sum += y * 2*c;
                x = x-y;
                if(a > c * 2){
                    sum += x * 2 * c;
                }else{
                    sum += x*a;
                }
            }else{
                sum += x * 2 *c;
                y = y-x;
                if(b > c*2){
                    sum += y * 2* c;
                }else{
                    sum += y*b;
                }
            }
        }else{
            sum = a*x + b*y;
        }
        System.out.println(sum);

    }
} 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 sum = 0;
        if((a+b)/2 >= c){
            if(x == y){
                sum = x * 2 *c;
            } else if (x > y) {
                sum += y * 2*c;
                x = x-y;
                if(a > c * 2){
                    sum += x * 2 * c;
                }else{
                    sum += x*a;
                }
            }else{
                sum += x * 2 *c;
                y = y-x;
                if(b > c*2){
                    sum += y * 2* c;
                }else{
                    sum += y*b;
                }
            }
        }else{
            sum = a*x + b*y;
        }
        System.out.println(sum);

    }
} 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 sum = 0;
        if((a+b)/2 >= c){
            if(x == y){
                sum = x * 2 *c;
            } else if (x > y) {
                sum += y * 2*c;
                x = x-y;
                if(a > c * 2){
                    sum += x * 2 * c;
                }else{
                    sum += x*a;
                }
            }else{
                sum += x * 2 *c;
                y = y-x;
                if(b > c*2){
                    sum += y * 2* c;
                }else{
                    sum += y*b;
                }
            }
        }else{
            sum = a*x + b*y;
        }
        System.out.println(sum);

    } 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 sum = 0;
        if((a+b)/2 >= c){
            if(x == y){
                sum = x * 2 *c;
            } else if (x > y) {
                sum += y * 2*c;
                x = x-y;
                if(a > c * 2){
                    sum += x * 2 * c;
                }else{
                    sum += x*a;
                }
            }else{
                sum += x * 2 *c;
                y = y-x;
                if(b > c*2){
                    sum += y * 2* c;
                }else{
                    sum += y*b;
                }
            }
        }else{
            sum = a*x + b*y;
        }
        System.out.println(sum);

    } 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 sum = 0; sum 0 if((a+b)/2 >= c){
            if(x == y){
                sum = x * 2 *c;
            } else if (x > y) {
                sum += y * 2*c;
                x = x-y;
                if(a > c * 2){
                    sum += x * 2 * c;
                }else{
                    sum += x*a;
                }
            }else{
                sum += x * 2 *c;
                y = y-x;
                if(b > c*2){
                    sum += y * 2* c;
                }else{
                    sum += y*b;
                }
            }
        }else{
            sum = a*x + b*y;
        } (a+b)/2 >= c (a+b)/2 (a+b) a b 2 c {
            if(x == y){
                sum = x * 2 *c;
            } else if (x > y) {
                sum += y * 2*c;
                x = x-y;
                if(a > c * 2){
                    sum += x * 2 * c;
                }else{
                    sum += x*a;
                }
            }else{
                sum += x * 2 *c;
                y = y-x;
                if(b > c*2){
                    sum += y * 2* c;
                }else{
                    sum += y*b;
                }
            }
        } if(x == y){
                sum = x * 2 *c;
            } else if (x > y) {
                sum += y * 2*c;
                x = x-y;
                if(a > c * 2){
                    sum += x * 2 * c;
                }else{
                    sum += x*a;
                }
            }else{
                sum += x * 2 *c;
                y = y-x;
                if(b > c*2){
                    sum += y * 2* c;
                }else{
                    sum += y*b;
                }
            } x == y x y {
                sum = x * 2 *c;
            } sum = x * 2 *c sum x * 2 *c x * 2 *c x 2 c if (x > y) {
                sum += y * 2*c;
                x = x-y;
                if(a > c * 2){
                    sum += x * 2 * c;
                }else{
                    sum += x*a;
                }
            }else{
                sum += x * 2 *c;
                y = y-x;
                if(b > c*2){
                    sum += y * 2* c;
                }else{
                    sum += y*b;
                }
            } x > y x y {
                sum += y * 2*c;
                x = x-y;
                if(a > c * 2){
                    sum += x * 2 * c;
                }else{
                    sum += x*a;
                }
            } sum += y * 2*c sum y * 2*c y * 2*c y 2 c x = x-y x x-y x y if(a > c * 2){
                    sum += x * 2 * c;
                }else{
                    sum += x*a;
                } a > c * 2 a c * 2 c 2 {
                    sum += x * 2 * c;
                } sum += x * 2 * c sum x * 2 * c x * 2 * c x 2 c {
                    sum += x*a;
                } sum += x*a sum x*a x a {
                sum += x * 2 *c;
                y = y-x;
                if(b > c*2){
                    sum += y * 2* c;
                }else{
                    sum += y*b;
                }
            } sum += x * 2 *c sum x * 2 *c x * 2 *c x 2 c y = y-x y y-x y x if(b > c*2){
                    sum += y * 2* c;
                }else{
                    sum += y*b;
                } b > c*2 b c*2 c 2 {
                    sum += y * 2* c;
                } sum += y * 2* c sum y * 2* c y * 2* c y 2 c {
                    sum += y*b;
                } sum += y*b sum y*b y b {
            sum = a*x + b*y;
        } sum = a*x + b*y sum a*x + b*y a*x a x b*y b y System.out.println(sum) System.out.println System.out System System.out sum 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 sum = 0;
        if((a+b)/2 >= c){
            if(x == y){
                sum = x * 2 *c;
            } else if (x > y) {
                sum += y * 2*c;
                x = x-y;
                if(a > c * 2){
                    sum += x * 2 * c;
                }else{
                    sum += x*a;
                }
            }else{
                sum += x * 2 *c;
                y = y-x;
                if(b > c*2){
                    sum += y * 2* c;
                }else{
                    sum += y*b;
                }
            }
        }else{
            sum = a*x + b*y;
        }
        System.out.println(sum);

    }
} 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 sum = 0;
        if((a+b)/2 >= c){
            if(x == y){
                sum = x * 2 *c;
            } else if (x > y) {
                sum += y * 2*c;
                x = x-y;
                if(a > c * 2){
                    sum += x * 2 * c;
                }else{
                    sum += x*a;
                }
            }else{
                sum += x * 2 *c;
                y = y-x;
                if(b > c*2){
                    sum += y * 2* c;
                }else{
                    sum += y*b;
                }
            }
        }else{
            sum = a*x + b*y;
        }
        System.out.println(sum);

    }
} 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 sum = 0;
        if((a+b)/2 >= c){
            if(x == y){
                sum = x * 2 *c;
            } else if (x > y) {
                sum += y * 2*c;
                x = x-y;
                if(a > c * 2){
                    sum += x * 2 * c;
                }else{
                    sum += x*a;
                }
            }else{
                sum += x * 2 *c;
                y = y-x;
                if(b > c*2){
                    sum += y * 2* c;
                }else{
                    sum += y*b;
                }
            }
        }else{
            sum = a*x + b*y;
        }
        System.out.println(sum);

    }
}