import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        int a = stdIn.nextInt();
        int b = stdIn.nextInt();
        int c = stdIn.nextInt();
        int x = stdIn.nextInt();
        int y = stdIn.nextInt();

        if(c - 0.5 * a - 0.5 * b > 0){
            System.out.println(a * x + b * y);
        }else{
            if(x < y){
                if(b * (y - x) + 2 * c * x <= 2 * c * y){
                    System.out.println(b * (y - x) + 2 * c * x);
                }else{
                    System.out.println(2 * c * y);
                }
            }else{
                if(a * (x - y) + 2 * c * y <= 2 * c * x){
                    System.out.println(a * (x - y) + 2 * c * y);
                }else{
                    System.out.println(2 * c * x);
                }
            }
        }
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        int a = stdIn.nextInt();
        int b = stdIn.nextInt();
        int c = stdIn.nextInt();
        int x = stdIn.nextInt();
        int y = stdIn.nextInt();

        if(c - 0.5 * a - 0.5 * b > 0){
            System.out.println(a * x + b * y);
        }else{
            if(x < y){
                if(b * (y - x) + 2 * c * x <= 2 * c * y){
                    System.out.println(b * (y - x) + 2 * c * x);
                }else{
                    System.out.println(2 * c * y);
                }
            }else{
                if(a * (x - y) + 2 * c * y <= 2 * c * x){
                    System.out.println(a * (x - y) + 2 * c * y);
                }else{
                    System.out.println(2 * c * x);
                }
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        int a = stdIn.nextInt();
        int b = stdIn.nextInt();
        int c = stdIn.nextInt();
        int x = stdIn.nextInt();
        int y = stdIn.nextInt();

        if(c - 0.5 * a - 0.5 * b > 0){
            System.out.println(a * x + b * y);
        }else{
            if(x < y){
                if(b * (y - x) + 2 * c * x <= 2 * c * y){
                    System.out.println(b * (y - x) + 2 * c * x);
                }else{
                    System.out.println(2 * c * y);
                }
            }else{
                if(a * (x - y) + 2 * c * y <= 2 * c * x){
                    System.out.println(a * (x - y) + 2 * c * y);
                }else{
                    System.out.println(2 * c * x);
                }
            }
        }
    } main {
        Scanner stdIn = new Scanner(System.in);

        int a = stdIn.nextInt();
        int b = stdIn.nextInt();
        int c = stdIn.nextInt();
        int x = stdIn.nextInt();
        int y = stdIn.nextInt();

        if(c - 0.5 * a - 0.5 * b > 0){
            System.out.println(a * x + b * y);
        }else{
            if(x < y){
                if(b * (y - x) + 2 * c * x <= 2 * c * y){
                    System.out.println(b * (y - x) + 2 * c * x);
                }else{
                    System.out.println(2 * c * y);
                }
            }else{
                if(a * (x - y) + 2 * c * y <= 2 * c * x){
                    System.out.println(a * (x - y) + 2 * c * y);
                }else{
                    System.out.println(2 * c * x);
                }
            }
        }
    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int a = stdIn.nextInt(); a stdIn.nextInt() stdIn.nextInt stdIn int b = stdIn.nextInt(); b stdIn.nextInt() stdIn.nextInt stdIn int c = stdIn.nextInt(); c stdIn.nextInt() stdIn.nextInt stdIn int x = stdIn.nextInt(); x stdIn.nextInt() stdIn.nextInt stdIn int y = stdIn.nextInt(); y stdIn.nextInt() stdIn.nextInt stdIn if(c - 0.5 * a - 0.5 * b > 0){
            System.out.println(a * x + b * y);
        }else{
            if(x < y){
                if(b * (y - x) + 2 * c * x <= 2 * c * y){
                    System.out.println(b * (y - x) + 2 * c * x);
                }else{
                    System.out.println(2 * c * y);
                }
            }else{
                if(a * (x - y) + 2 * c * y <= 2 * c * x){
                    System.out.println(a * (x - y) + 2 * c * y);
                }else{
                    System.out.println(2 * c * x);
                }
            }
        } c - 0.5 * a - 0.5 * b > 0 c - 0.5 * a - 0.5 * b c - 0.5 * a - 0.5 * b c 0.5 * a 0.5 a 0.5 * b 0.5 b 0 {
            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 {
            if(x < y){
                if(b * (y - x) + 2 * c * x <= 2 * c * y){
                    System.out.println(b * (y - x) + 2 * c * x);
                }else{
                    System.out.println(2 * c * y);
                }
            }else{
                if(a * (x - y) + 2 * c * y <= 2 * c * x){
                    System.out.println(a * (x - y) + 2 * c * y);
                }else{
                    System.out.println(2 * c * x);
                }
            }
        } if(x < y){
                if(b * (y - x) + 2 * c * x <= 2 * c * y){
                    System.out.println(b * (y - x) + 2 * c * x);
                }else{
                    System.out.println(2 * c * y);
                }
            }else{
                if(a * (x - y) + 2 * c * y <= 2 * c * x){
                    System.out.println(a * (x - y) + 2 * c * y);
                }else{
                    System.out.println(2 * c * x);
                }
            } x < y x y {
                if(b * (y - x) + 2 * c * x <= 2 * c * y){
                    System.out.println(b * (y - x) + 2 * c * x);
                }else{
                    System.out.println(2 * c * y);
                }
            } if(b * (y - x) + 2 * c * x <= 2 * c * y){
                    System.out.println(b * (y - x) + 2 * c * x);
                }else{
                    System.out.println(2 * c * y);
                } b * (y - x) + 2 * c * x <= 2 * c * y b * (y - x) + 2 * c * x b * (y - x) b (y - x) y x 2 * c * x 2 * c * x 2 c x 2 * c * y 2 * c * y 2 c y {
                    System.out.println(b * (y - x) + 2 * c * x);
                } System.out.println(b * (y - x) + 2 * c * x) System.out.println System.out System System.out b * (y - x) + 2 * c * x b * (y - x) b (y - x) y x 2 * c * x 2 * c * x 2 c x {
                    System.out.println(2 * c * y);
                } System.out.println(2 * c * y) System.out.println System.out System System.out 2 * c * y 2 * c * y 2 c y {
                if(a * (x - y) + 2 * c * y <= 2 * c * x){
                    System.out.println(a * (x - y) + 2 * c * y);
                }else{
                    System.out.println(2 * c * x);
                }
            } if(a * (x - y) + 2 * c * y <= 2 * c * x){
                    System.out.println(a * (x - y) + 2 * c * y);
                }else{
                    System.out.println(2 * c * x);
                } a * (x - y) + 2 * c * y <= 2 * c * x a * (x - y) + 2 * c * y a * (x - y) a (x - y) x y 2 * c * y 2 * c * y 2 c y 2 * c * x 2 * c * x 2 c x {
                    System.out.println(a * (x - y) + 2 * c * y);
                } System.out.println(a * (x - y) + 2 * c * y) System.out.println System.out System System.out a * (x - y) + 2 * c * y a * (x - y) a (x - y) x y 2 * c * y 2 * c * y 2 c y {
                    System.out.println(2 * c * x);
                } System.out.println(2 * c * x) System.out.println System.out System System.out 2 * c * x 2 * c * x 2 c x String[] args args public class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        int a = stdIn.nextInt();
        int b = stdIn.nextInt();
        int c = stdIn.nextInt();
        int x = stdIn.nextInt();
        int y = stdIn.nextInt();

        if(c - 0.5 * a - 0.5 * b > 0){
            System.out.println(a * x + b * y);
        }else{
            if(x < y){
                if(b * (y - x) + 2 * c * x <= 2 * c * y){
                    System.out.println(b * (y - x) + 2 * c * x);
                }else{
                    System.out.println(2 * c * y);
                }
            }else{
                if(a * (x - y) + 2 * c * y <= 2 * c * x){
                    System.out.println(a * (x - y) + 2 * c * y);
                }else{
                    System.out.println(2 * c * x);
                }
            }
        }
    }
} public class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        int a = stdIn.nextInt();
        int b = stdIn.nextInt();
        int c = stdIn.nextInt();
        int x = stdIn.nextInt();
        int y = stdIn.nextInt();

        if(c - 0.5 * a - 0.5 * b > 0){
            System.out.println(a * x + b * y);
        }else{
            if(x < y){
                if(b * (y - x) + 2 * c * x <= 2 * c * y){
                    System.out.println(b * (y - x) + 2 * c * x);
                }else{
                    System.out.println(2 * c * y);
                }
            }else{
                if(a * (x - y) + 2 * c * y <= 2 * c * x){
                    System.out.println(a * (x - y) + 2 * c * y);
                }else{
                    System.out.println(2 * c * x);
                }
            }
        }
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        int a = stdIn.nextInt();
        int b = stdIn.nextInt();
        int c = stdIn.nextInt();
        int x = stdIn.nextInt();
        int y = stdIn.nextInt();

        if(c - 0.5 * a - 0.5 * b > 0){
            System.out.println(a * x + b * y);
        }else{
            if(x < y){
                if(b * (y - x) + 2 * c * x <= 2 * c * y){
                    System.out.println(b * (y - x) + 2 * c * x);
                }else{
                    System.out.println(2 * c * y);
                }
            }else{
                if(a * (x - y) + 2 * c * y <= 2 * c * x){
                    System.out.println(a * (x - y) + 2 * c * y);
                }else{
                    System.out.println(2 * c * x);
                }
            }
        }
    }
}