#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<queue>
using namespace std;
int main ()
{
        int a,b,c,x,y;
        int temp,temp2,temp3,sum;
        while(cin>>a>>b>>c>>x>>y)
        {
                sum=0;
                if(x<y)
                {
                        temp=x;
                        temp2=y;
                        temp3=b;
                }
                else
                {
                        temp=y;
                        temp2=x;
                        temp3=a;
                }
                if(2*c<a+b)
                {

                                sum+=c*(temp*2);


                                sum+=temp3*(temp2-temp);

                        if(temp2*2*c<sum)
                        {
                                sum=temp2*2*c;
                        }
                }
                else
                {

                                sum+=a*x;


                                sum+=b*y;

                }
                cout<<sum<<endl;
        }
}
