#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <stdint.h>
#include <string.h>
#include <math.h>

int main(void) {
	uint32_t A, B, C, X, Y;
	uint32_t numA = 0;
	uint32_t numB = 0;
	uint32_t numC = 0;

	scanf("%"PRIu32" %"PRIu32" %"PRIu32" %"PRIu32" %"PRIu32, &A, &B, &C, &X, &Y);

	if ((A + B) / 2 > C) {
		if (X > Y) {
			numC += Y * 2;
			if ((X - Y)*A > (X - Y)*C*2) {
				numC += (X - Y) * 2;
			}
			else {
				numA += X - Y;
			}
		}
		else {
			numC = X * 2;
			if ((Y - X)*B > (Y - X)*C * 2) {
				numC += (Y - X) * 2;
			}
			else {
				numB += Y - X;
			}
		}
	}
	else {
		numA = X;
		numB = Y;
	}

	printf("%"PRIu32, A*numA + B * numB + C * numC);

	return 0;
}
