#define _CRT_SECURE_NO_WARNINGS
#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*AB){
        money=A*X+B*Y;
    }
    if((A+B)>2*AB){
        if(X>Y){
            money=AB*Y*2+(X-Y);
        }
        else{
            money=AB*X*2+(Y-X);
        }
    }
    printf("%d", money);
    return 0;
}