#include<bits/stdc++.h>
using namespace std;
int main()
{long long  a,b,c,x,y,ans;
    scanf("%d %d %d %d %d",&a,&b,&c,&x,&y);
    ans=max(x,y)*2*c;
    ans=min(ans,min(x,y)*2*c+(y>x?(y-x)*b:(x-y)*a));
    ans=min(ans,a*x+b*y);
    cout<<ans;
    return 0;
}