#include<stdio.h>
int main(void) {

	int a,b,c,x,y,min;

	scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);

	if (a + b >= c * 2) {
		if (x <= y) {
			if (b <= c * 2) {
				min = c * x * 2 + (y - x)*b;
			}
			else {
				min = c * x * 2 + (y - x)*c * 2;
			}
		}
		else if {
			if (a <= c * 2) {
				min = c * y * 2 + (x - y)*a;
			}
			else {
				min = c * y * 2 + (x - y)*c * 2;
			}
		}
	}

	if (a + b < c * 2) {
		min = a * x + b * y;
	}

	printf("%d\n", min);

	return 0;
}