import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());

        // 主処理
        int max = Math.max(x, y);
        int min = Math.min(x, y);
        int allHalf = c * max * 2;
        int noHalf = a * x + b * y;
        int both = c * min * 2 + a * (x - min) + b * (y - min);
        int result = Math.min(Math.min(allHalf, noHalf), both);

        // 出力
        System.out.println(result);
        sc.close();
    }
} import java.util.*; util.* java public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());

        // 主処理
        int max = Math.max(x, y);
        int min = Math.min(x, y);
        int allHalf = c * max * 2;
        int noHalf = a * x + b * y;
        int both = c * min * 2 + a * (x - min) + b * (y - min);
        int result = Math.min(Math.min(allHalf, noHalf), both);

        // 出力
        System.out.println(result);
        sc.close();
    }
} Main public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());

        // 主処理
        int max = Math.max(x, y);
        int min = Math.min(x, y);
        int allHalf = c * max * 2;
        int noHalf = a * x + b * y;
        int both = c * min * 2 + a * (x - min) + b * (y - min);
        int result = Math.min(Math.min(allHalf, noHalf), both);

        // 出力
        System.out.println(result);
        sc.close();
    } main {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());

        // 主処理
        int max = Math.max(x, y);
        int min = Math.min(x, y);
        int allHalf = c * max * 2;
        int noHalf = a * x + b * y;
        int both = c * min * 2 + a * (x - min) + b * (y - min);
        int result = Math.min(Math.min(allHalf, noHalf), both);

        // 出力
        System.out.println(result);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int c = Integer.parseInt(sc.next()); c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int x = Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int y = Integer.parseInt(sc.next()); y Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int max = Math.max(x, y); max Math.max(x, y) Math.max Math x y int min = Math.min(x, y); min Math.min(x, y) Math.min Math x y int allHalf = c * max * 2; allHalf c * max * 2 c * max * 2 c max 2 int noHalf = a * x + b * y; noHalf a * x + b * y a * x a x b * y b y int both = c * min * 2 + a * (x - min) + b * (y - min); both c * min * 2 + a * (x - min) + b * (y - min) c * min * 2 + a * (x - min) + b * (y - min) c * min * 2 c * min * 2 c min 2 a * (x - min) a (x - min) x min b * (y - min) b (y - min) y min int result = Math.min(Math.min(allHalf, noHalf), both); result Math.min(Math.min(allHalf, noHalf), both) Math.min Math Math.min(allHalf, noHalf) Math.min Math allHalf noHalf both System.out.println(result) System.out.println System.out System System.out result sc.close() sc.close sc String args[] args public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());

        // 主処理
        int max = Math.max(x, y);
        int min = Math.min(x, y);
        int allHalf = c * max * 2;
        int noHalf = a * x + b * y;
        int both = c * min * 2 + a * (x - min) + b * (y - min);
        int result = Math.min(Math.min(allHalf, noHalf), both);

        // 出力
        System.out.println(result);
        sc.close();
    }
} public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());

        // 主処理
        int max = Math.max(x, y);
        int min = Math.min(x, y);
        int allHalf = c * max * 2;
        int noHalf = a * x + b * y;
        int both = c * min * 2 + a * (x - min) + b * (y - min);
        int result = Math.min(Math.min(allHalf, noHalf), both);

        // 出力
        System.out.println(result);
        sc.close();
    }
} Main
import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());

        // 主処理
        int max = Math.max(x, y);
        int min = Math.min(x, y);
        int allHalf = c * max * 2;
        int noHalf = a * x + b * y;
        int both = c * min * 2 + a * (x - min) + b * (y - min);
        int result = Math.min(Math.min(allHalf, noHalf), both);

        // 出力
        System.out.println(result);
        sc.close();
    }
}
