import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();

        if (a+b<=2*c){
            System.out.println(a*x+b*y);
        }else{
            int i = Math.abs(x-y);
            int j;
            if (x>y){
                if (a>2*c){
                    j = 2*c*i;
                }else{
                    j = a*i;
                }
            }else if (x<y){
                if (b>2*c){
                    j = 2*c*i;
                }else{
                    j = b*i;
                }
            }else {
                j = 0;
            }
            System.out.println(Math.min(x,y)*2*c+j);

        }
    }

} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();

        if (a+b<=2*c){
            System.out.println(a*x+b*y);
        }else{
            int i = Math.abs(x-y);
            int j;
            if (x>y){
                if (a>2*c){
                    j = 2*c*i;
                }else{
                    j = a*i;
                }
            }else if (x<y){
                if (b>2*c){
                    j = 2*c*i;
                }else{
                    j = b*i;
                }
            }else {
                j = 0;
            }
            System.out.println(Math.min(x,y)*2*c+j);

        }
    }

} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();

        if (a+b<=2*c){
            System.out.println(a*x+b*y);
        }else{
            int i = Math.abs(x-y);
            int j;
            if (x>y){
                if (a>2*c){
                    j = 2*c*i;
                }else{
                    j = a*i;
                }
            }else if (x<y){
                if (b>2*c){
                    j = 2*c*i;
                }else{
                    j = b*i;
                }
            }else {
                j = 0;
            }
            System.out.println(Math.min(x,y)*2*c+j);

        }
    } main {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();

        if (a+b<=2*c){
            System.out.println(a*x+b*y);
        }else{
            int i = Math.abs(x-y);
            int j;
            if (x>y){
                if (a>2*c){
                    j = 2*c*i;
                }else{
                    j = a*i;
                }
            }else if (x<y){
                if (b>2*c){
                    j = 2*c*i;
                }else{
                    j = b*i;
                }
            }else {
                j = 0;
            }
            System.out.println(Math.min(x,y)*2*c+j);

        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner int c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner int y = scanner.nextInt(); y scanner.nextInt() scanner.nextInt scanner if (a+b<=2*c){
            System.out.println(a*x+b*y);
        }else{
            int i = Math.abs(x-y);
            int j;
            if (x>y){
                if (a>2*c){
                    j = 2*c*i;
                }else{
                    j = a*i;
                }
            }else if (x<y){
                if (b>2*c){
                    j = 2*c*i;
                }else{
                    j = b*i;
                }
            }else {
                j = 0;
            }
            System.out.println(Math.min(x,y)*2*c+j);

        } a+b<=2*c a+b a b 2*c 2 c {
            System.out.println(a*x+b*y);
        } 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 {
            int i = Math.abs(x-y);
            int j;
            if (x>y){
                if (a>2*c){
                    j = 2*c*i;
                }else{
                    j = a*i;
                }
            }else if (x<y){
                if (b>2*c){
                    j = 2*c*i;
                }else{
                    j = b*i;
                }
            }else {
                j = 0;
            }
            System.out.println(Math.min(x,y)*2*c+j);

        } int i = Math.abs(x-y); i Math.abs(x-y) Math.abs Math x-y x y int j; j if (x>y){
                if (a>2*c){
                    j = 2*c*i;
                }else{
                    j = a*i;
                }
            }else if (x<y){
                if (b>2*c){
                    j = 2*c*i;
                }else{
                    j = b*i;
                }
            }else {
                j = 0;
            } x>y x y {
                if (a>2*c){
                    j = 2*c*i;
                }else{
                    j = a*i;
                }
            } if (a>2*c){
                    j = 2*c*i;
                }else{
                    j = a*i;
                } a>2*c a 2*c 2 c {
                    j = 2*c*i;
                } j = 2*c*i j 2*c*i 2*c*i 2 c i {
                    j = a*i;
                } j = a*i j a*i a i if (x<y){
                if (b>2*c){
                    j = 2*c*i;
                }else{
                    j = b*i;
                }
            }else {
                j = 0;
            } x<y x y {
                if (b>2*c){
                    j = 2*c*i;
                }else{
                    j = b*i;
                }
            } if (b>2*c){
                    j = 2*c*i;
                }else{
                    j = b*i;
                } b>2*c b 2*c 2 c {
                    j = 2*c*i;
                } j = 2*c*i j 2*c*i 2*c*i 2 c i {
                    j = b*i;
                } j = b*i j b*i b i {
                j = 0;
            } j = 0 j 0 System.out.println(Math.min(x,y)*2*c+j) System.out.println System.out System System.out Math.min(x,y)*2*c+j Math.min(x,y)*2*c Math.min(x,y)*2*c Math.min(x,y) Math.min Math x y 2 c j String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();

        if (a+b<=2*c){
            System.out.println(a*x+b*y);
        }else{
            int i = Math.abs(x-y);
            int j;
            if (x>y){
                if (a>2*c){
                    j = 2*c*i;
                }else{
                    j = a*i;
                }
            }else if (x<y){
                if (b>2*c){
                    j = 2*c*i;
                }else{
                    j = b*i;
                }
            }else {
                j = 0;
            }
            System.out.println(Math.min(x,y)*2*c+j);

        }
    }

} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();

        if (a+b<=2*c){
            System.out.println(a*x+b*y);
        }else{
            int i = Math.abs(x-y);
            int j;
            if (x>y){
                if (a>2*c){
                    j = 2*c*i;
                }else{
                    j = a*i;
                }
            }else if (x<y){
                if (b>2*c){
                    j = 2*c*i;
                }else{
                    j = b*i;
                }
            }else {
                j = 0;
            }
            System.out.println(Math.min(x,y)*2*c+j);

        }
    }

} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();

        if (a+b<=2*c){
            System.out.println(a*x+b*y);
        }else{
            int i = Math.abs(x-y);
            int j;
            if (x>y){
                if (a>2*c){
                    j = 2*c*i;
                }else{
                    j = a*i;
                }
            }else if (x<y){
                if (b>2*c){
                    j = 2*c*i;
                }else{
                    j = b*i;
                }
            }else {
                j = 0;
            }
            System.out.println(Math.min(x,y)*2*c+j);

        }
    }

}