import java.util.Scanner;

public class Main {

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

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final int C = sc.nextInt();
        final int X = sc.nextInt();
        final int Y = sc.nextInt();
        final int min = Math.min(X, Y);
        final int max = Math.max(X, Y);

        System.out.println(Math.min(Math.min(A + B, 2 * C) * min + A * (X - min) + B * (Y - min), max * 2 * C));
    }
} import java.util.Scanner; Scanner java.util public class Main {

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

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final int C = sc.nextInt();
        final int X = sc.nextInt();
        final int Y = sc.nextInt();
        final int min = Math.min(X, Y);
        final int max = Math.max(X, Y);

        System.out.println(Math.min(Math.min(A + B, 2 * C) * min + A * (X - min) + B * (Y - min), max * 2 * C));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final int C = sc.nextInt();
        final int X = sc.nextInt();
        final int Y = sc.nextInt();
        final int min = Math.min(X, Y);
        final int max = Math.max(X, Y);

        System.out.println(Math.min(Math.min(A + B, 2 * C) * min + A * (X - min) + B * (Y - min), max * 2 * C));
    } main {
        Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final int C = sc.nextInt();
        final int X = sc.nextInt();
        final int Y = sc.nextInt();
        final int min = Math.min(X, Y);
        final int max = Math.max(X, Y);

        System.out.println(Math.min(Math.min(A + B, 2 * C) * min + A * (X - min) + B * (Y - min), max * 2 * C));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc final int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc final int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc final int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc final int Y = sc.nextInt(); Y sc.nextInt() sc.nextInt sc final int min = Math.min(X, Y); min Math.min(X, Y) Math.min Math X Y final int max = Math.max(X, Y); max Math.max(X, Y) Math.max Math X Y System.out.println(Math.min(Math.min(A + B, 2 * C) * min + A * (X - min) + B * (Y - min), max * 2 * C)) System.out.println System.out System System.out Math.min(Math.min(A + B, 2 * C) * min + A * (X - min) + B * (Y - min), max * 2 * C) Math.min Math Math.min(A + B, 2 * C) * min + A * (X - min) + B * (Y - min) Math.min(A + B, 2 * C) * min + A * (X - min) + B * (Y - min) Math.min(A + B, 2 * C) * min Math.min(A + B, 2 * C) Math.min Math A + B A B 2 * C 2 C min A * (X - min) A (X - min) X min B * (Y - min) B (Y - min) Y min max * 2 * C max * 2 * C max 2 C String[] args args public class Main {

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

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final int C = sc.nextInt();
        final int X = sc.nextInt();
        final int Y = sc.nextInt();
        final int min = Math.min(X, Y);
        final int max = Math.max(X, Y);

        System.out.println(Math.min(Math.min(A + B, 2 * C) * min + A * (X - min) + B * (Y - min), max * 2 * C));
    }
} public class Main {

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

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final int C = sc.nextInt();
        final int X = sc.nextInt();
        final int Y = sc.nextInt();
        final int min = Math.min(X, Y);
        final int max = Math.max(X, Y);

        System.out.println(Math.min(Math.min(A + B, 2 * C) * min + A * (X - min) + B * (Y - min), max * 2 * C));
    }
} Main
import java.util.Scanner;

public class Main {

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

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final int C = sc.nextInt();
        final int X = sc.nextInt();
        final int Y = sc.nextInt();
        final int min = Math.min(X, Y);
        final int max = Math.max(X, Y);

        System.out.println(Math.min(Math.min(A + B, 2 * C) * min + A * (X - min) + B * (Y - min), max * 2 * C));
    }
}
