import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        int[] a = { 0, 0, 0, 0, 0 };
        Scanner scan = new Scanner(System.in);
        if (scan.hasNextInt()) {
            for (int i = 0; i < a.length; i++) {
                a[i] = scan.nextInt();
            }
        }
        int sum = 0;

        if (a[0] + a[1] <= a[2] * 2) {
            sum = a[0] * a[3] + a[1] * a[4];
        } else {
            if (a[3] >= a[4]) {
                sum = a[4] * 2 * a[2];
                sum = sum + (a[3] - a[4]) * a[0];
            } else {
                sum = a[3] * 2 * a[2];
                sum = sum + (a[4] - a[3]) * a[1];
            }

        }
        int sum1 = 0;
        if (a[3] >= a[4]) {
            sum1 = a[3] * a[2] * 2;
        }
        if (a[3] < a[4]) {
            sum1 = a[4] * a[2] * 2;
        }
        if (sum > sum1) {
            sum = sum1;
        }
        System.out.println(sum);
        scan.close();
    }
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz