
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.next());
        int b = Integer.parseInt(scan.next());
        int c = Integer.parseInt(scan.next());
        int x = Integer.parseInt(scan.next());
        int y = Integer.parseInt(scan.next());
        scan.close();

        long ans = Long.MAX_VALUE;

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

        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.next());
        int b = Integer.parseInt(scan.next());
        int c = Integer.parseInt(scan.next());
        int x = Integer.parseInt(scan.next());
        int y = Integer.parseInt(scan.next());
        scan.close();

        long ans = Long.MAX_VALUE;

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

        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.next());
        int b = Integer.parseInt(scan.next());
        int c = Integer.parseInt(scan.next());
        int x = Integer.parseInt(scan.next());
        int y = Integer.parseInt(scan.next());
        scan.close();

        long ans = Long.MAX_VALUE;

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

        System.out.println(ans);
    } main {
        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.next());
        int b = Integer.parseInt(scan.next());
        int c = Integer.parseInt(scan.next());
        int x = Integer.parseInt(scan.next());
        int y = Integer.parseInt(scan.next());
        scan.close();

        long ans = Long.MAX_VALUE;

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

        System.out.println(ans);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = Integer.parseInt(scan.next()); a Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int b = Integer.parseInt(scan.next()); b Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int c = Integer.parseInt(scan.next()); c Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int x = Integer.parseInt(scan.next()); x Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int y = Integer.parseInt(scan.next()); y Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan scan.close() scan.close scan long ans = Long.MAX_VALUE; ans Long.MAX_VALUE Long Long.MAX_VALUE ans = Math.min(ans, a * x + b * y) ans Math.min(ans, a * x + b * y) Math.min Math ans a * x + b * y a * x a x b * y b y if (x >= y) {
            ans = Math.min(ans, a * (x - y) + c * 2 * y);
            ans = Math.min(ans, c * 2 * x);
        } else {
            ans = Math.min(ans, b * (y - x) + c * 2 * x);
            ans = Math.min(ans, c * 2 * y);
        } x >= y x y {
            ans = Math.min(ans, a * (x - y) + c * 2 * y);
            ans = Math.min(ans, c * 2 * x);
        } ans = Math.min(ans, a * (x - y) + c * 2 * y) ans Math.min(ans, a * (x - y) + c * 2 * y) Math.min Math ans a * (x - y) + c * 2 * y a * (x - y) a (x - y) x y c * 2 * y c * 2 * y c 2 y ans = Math.min(ans, c * 2 * x) ans Math.min(ans, c * 2 * x) Math.min Math ans c * 2 * x c * 2 * x c 2 x {
            ans = Math.min(ans, b * (y - x) + c * 2 * x);
            ans = Math.min(ans, c * 2 * y);
        } ans = Math.min(ans, b * (y - x) + c * 2 * x) ans Math.min(ans, b * (y - x) + c * 2 * x) Math.min Math ans b * (y - x) + c * 2 * x b * (y - x) b (y - x) y x c * 2 * x c * 2 * x c 2 x ans = Math.min(ans, c * 2 * y) ans Math.min(ans, c * 2 * y) Math.min Math ans c * 2 * y c * 2 * y c 2 y System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.next());
        int b = Integer.parseInt(scan.next());
        int c = Integer.parseInt(scan.next());
        int x = Integer.parseInt(scan.next());
        int y = Integer.parseInt(scan.next());
        scan.close();

        long ans = Long.MAX_VALUE;

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

        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.next());
        int b = Integer.parseInt(scan.next());
        int c = Integer.parseInt(scan.next());
        int x = Integer.parseInt(scan.next());
        int y = Integer.parseInt(scan.next());
        scan.close();

        long ans = Long.MAX_VALUE;

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

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

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.next());
        int b = Integer.parseInt(scan.next());
        int c = Integer.parseInt(scan.next());
        int x = Integer.parseInt(scan.next());
        int y = Integer.parseInt(scan.next());
        scan.close();

        long ans = Long.MAX_VALUE;

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

        System.out.println(ans);
    }
}
