#include <stdio.h>

int main()
{
    int a, b, c, x, y;
    int sum = 0;
    scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
    int i;
    if ((a + b) / 2 > c) {
        if (x >= y) {
            sum = sum + (x - y) * a + y * c * 2;
        } else {
            sum = sum + (y - x) * b + x * c * 2;
        }
    }  else {
        if (x >= y) {
            sum = sum + (x - y) * a + y * (a + b);
        } else {
            sum = sum + (y - x) * b + x * (a + b);
        }
    }
    printf("%d\n", sum);
    return 0;
}