import java.util.*;

public class Main {

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

        int cost = Integer.MAX_VALUE;
        int n = Math.max(x, y);
        for (int i = 0; i <= n; ++i) {
            int X = x - i;
            int Y = y - i;
            if (x - i <= 0) X = 0;
            if (y - i <= 0) Y = 0;
            int tmp = (c * 2) * i + a * X + b * Y;
            cost = Math.min(tmp, cost);
        }
        System.out.println(cost);
    }
} import java.util.*; util.* java public class Main {

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

        int cost = Integer.MAX_VALUE;
        int n = Math.max(x, y);
        for (int i = 0; i <= n; ++i) {
            int X = x - i;
            int Y = y - i;
            if (x - i <= 0) X = 0;
            if (y - i <= 0) Y = 0;
            int tmp = (c * 2) * i + a * X + b * Y;
            cost = Math.min(tmp, cost);
        }
        System.out.println(cost);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();

        int cost = Integer.MAX_VALUE;
        int n = Math.max(x, y);
        for (int i = 0; i <= n; ++i) {
            int X = x - i;
            int Y = y - i;
            if (x - i <= 0) X = 0;
            if (y - i <= 0) Y = 0;
            int tmp = (c * 2) * i + a * X + b * Y;
            cost = Math.min(tmp, cost);
        }
        System.out.println(cost);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();

        int cost = Integer.MAX_VALUE;
        int n = Math.max(x, y);
        for (int i = 0; i <= n; ++i) {
            int X = x - i;
            int Y = y - i;
            if (x - i <= 0) X = 0;
            if (y - i <= 0) Y = 0;
            int tmp = (c * 2) * i + a * X + b * Y;
            cost = Math.min(tmp, cost);
        }
        System.out.println(cost);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int y = sc.nextInt(); y sc.nextInt() sc.nextInt sc int cost = Integer.MAX_VALUE; cost Integer.MAX_VALUE Integer Integer.MAX_VALUE int n = Math.max(x, y); n Math.max(x, y) Math.max Math x y for (int i = 0; i <= n; ++i) {
            int X = x - i;
            int Y = y - i;
            if (x - i <= 0) X = 0;
            if (y - i <= 0) Y = 0;
            int tmp = (c * 2) * i + a * X + b * Y;
            cost = Math.min(tmp, cost);
        } int i = 0; int i = 0; i 0 i <= n i n ++i ++i i {
            int X = x - i;
            int Y = y - i;
            if (x - i <= 0) X = 0;
            if (y - i <= 0) Y = 0;
            int tmp = (c * 2) * i + a * X + b * Y;
            cost = Math.min(tmp, cost);
        } {
            int X = x - i;
            int Y = y - i;
            if (x - i <= 0) X = 0;
            if (y - i <= 0) Y = 0;
            int tmp = (c * 2) * i + a * X + b * Y;
            cost = Math.min(tmp, cost);
        } int X = x - i; X x - i x i int Y = y - i; Y y - i y i if (x - i <= 0) X = 0; x - i <= 0 x - i x i 0 X = 0 X 0 if (y - i <= 0) Y = 0; y - i <= 0 y - i y i 0 Y = 0 Y 0 int tmp = (c * 2) * i + a * X + b * Y; tmp (c * 2) * i + a * X + b * Y (c * 2) * i + a * X + b * Y (c * 2) * i (c * 2) c 2 i a * X a X b * Y b Y cost = Math.min(tmp, cost) cost Math.min(tmp, cost) Math.min Math tmp cost System.out.println(cost) System.out.println System.out System System.out cost String[] args args public class Main {

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

        int cost = Integer.MAX_VALUE;
        int n = Math.max(x, y);
        for (int i = 0; i <= n; ++i) {
            int X = x - i;
            int Y = y - i;
            if (x - i <= 0) X = 0;
            if (y - i <= 0) Y = 0;
            int tmp = (c * 2) * i + a * X + b * Y;
            cost = Math.min(tmp, cost);
        }
        System.out.println(cost);
    }
} public class Main {

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

        int cost = Integer.MAX_VALUE;
        int n = Math.max(x, y);
        for (int i = 0; i <= n; ++i) {
            int X = x - i;
            int Y = y - i;
            if (x - i <= 0) X = 0;
            if (y - i <= 0) Y = 0;
            int tmp = (c * 2) * i + a * X + b * Y;
            cost = Math.min(tmp, cost);
        }
        System.out.println(cost);
    }
} Main
import java.util.*;

public class Main {

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

        int cost = Integer.MAX_VALUE;
        int n = Math.max(x, y);
        for (int i = 0; i <= n; ++i) {
            int X = x - i;
            int Y = y - i;
            if (x - i <= 0) X = 0;
            if (y - i <= 0) Y = 0;
            int tmp = (c * 2) * i + a * X + b * Y;
            cost = Math.min(tmp, cost);
        }
        System.out.println(cost);
    }
}