#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(x) (x).begin(), (x).end()
#define int long long
#define double long double

main(){
	int a,b,c,x,y;
  cin>>a>>b>>c>>x>>y;
  int d,e;
  d=x*a+y*b;
  if(x>=y) e=y*c*2+(x-y)*a;
  else e=x*c*2+(y-x)*b;
  cout<<min(d,e)<<endl;
}
