#include<bits/stdc++.h>
using namespace std;
int a[5];
int main(){ 
int a,b,c,x,y,min_xy,max_xy;
cin>>a>>b>>c>>x>>y;
min_xy=min(x,y);
max_xy=max(x,y);
a[0]=ax+by;
a[1]=2*min_xy*c+abs(x-y)*a;
a[2]=2*max_xy*c;
sort(a,a+n);
cout<<a[0]<<endl;
	return 0;
}