
import java.util.Scanner;

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

        int result;
        if (x < y) {
            result = Math.min((a + b) * x, c * 2 * x);
            result += Math.min(b * (y - x), 2 * c * (y - x));
        } else {
            result = Math.min((a + b) * y, c * 2 * y);
            result += Math.min(a * (x - y), c * 2 * (x - y));
        }

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

        int result;
        if (x < y) {
            result = Math.min((a + b) * x, c * 2 * x);
            result += Math.min(b * (y - x), 2 * c * (y - x));
        } else {
            result = Math.min((a + b) * y, c * 2 * y);
            result += Math.min(a * (x - y), c * 2 * (x - y));
        }

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

        int result;
        if (x < y) {
            result = Math.min((a + b) * x, c * 2 * x);
            result += Math.min(b * (y - x), 2 * c * (y - x));
        } else {
            result = Math.min((a + b) * y, c * 2 * y);
            result += Math.min(a * (x - y), c * 2 * (x - y));
        }

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

        int result;
        if (x < y) {
            result = Math.min((a + b) * x, c * 2 * x);
            result += Math.min(b * (y - x), 2 * c * (y - x));
        } else {
            result = Math.min((a + b) * y, c * 2 * y);
            result += Math.min(a * (x - y), c * 2 * (x - y));
        }

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

        int result;
        if (x < y) {
            result = Math.min((a + b) * x, c * 2 * x);
            result += Math.min(b * (y - x), 2 * c * (y - x));
        } else {
            result = Math.min((a + b) * y, c * 2 * y);
            result += Math.min(a * (x - y), c * 2 * (x - y));
        }

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

        int result;
        if (x < y) {
            result = Math.min((a + b) * x, c * 2 * x);
            result += Math.min(b * (y - x), 2 * c * (y - x));
        } else {
            result = Math.min((a + b) * y, c * 2 * y);
            result += Math.min(a * (x - y), c * 2 * (x - y));
        }

        System.out.println(result);
    }
} Main

import java.util.Scanner;

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

        int result;
        if (x < y) {
            result = Math.min((a + b) * x, c * 2 * x);
            result += Math.min(b * (y - x), 2 * c * (y - x));
        } else {
            result = Math.min((a + b) * y, c * 2 * y);
            result += Math.min(a * (x - y), c * 2 * (x - y));
        }

        System.out.println(result);
    }
}
