#define _CRT_SECURE_NO_WARNINGS
g++ -O2 -Wall -Wno-unused-result hello.cpp -o hello
#include<stdio.h>

int main()
{
    int A, B, C, X, Y, money;
    scanf("%d%d%d%d%d", &A, &B, &C, &X, &Y);

    if((A+B)<=2*C){
        money=A*X+B*Y;
    }
    else{
        if(X>Y){
            money=C*Y*2+(X-Y);
        }
        else{
            money=C*X*2+(Y-X);
        }
    }
    printf("%d", money);
    return 0;
}