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

        if(a+b<2*c){
            System.out.println(a*x+b*y);
            return;
        }

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

        if(a+b<2*c){
            System.out.println(a*x+b*y);
            return;
        }

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

        if(a+b<2*c){
            System.out.println(a*x+b*y);
            return;
        }

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

        if(a+b<2*c){
            System.out.println(a*x+b*y);
            return;
        }

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

        if(a+b<2*c){
            System.out.println(a*x+b*y);
            return;
        }

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

        if(a+b<2*c){
            System.out.println(a*x+b*y);
            return;
        }

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

        if(a+b<2*c){
            System.out.println(a*x+b*y);
            return;
        }

        int needA = 0;
        int needB = 0;
        int needC = 0;
        if(x>y){
            needA = x-y;
            needC = 2*y;
            if(a*needA > 2*needA*c){
                needC += 2*needA;
                needA = 0;
            }else{
            }
        }else{
            needB = y-x;
            needC = 2*x;
            if(b*needB > 2*needB*c){
                needC += 2*needB;
                needB = 0;
            }else{
            }
        }
//        System.out.println(needA+" "+needB+" "+needC);
        System.out.println(needA*a+needB*b+needC*c);
    }
}