#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#define rep(i,n) for(int i=0;i<n;i++)
const long long MOD = 1000000007;
typedef pair<int,int> P;
typedef long long ll;

int main(void){
  ll a,b,c,x,y;
  cin >> a >> b >> c >> x >> y;
  ll tmp = 0;
  if(x > y) tmp = a;
  else tmp = b;
  vector<ll> ans = {};
  ans.push_back(a*x+b*y);
  ans.push_back(2*c*(2*(max(x,y)/2)+max(x,y)%2));
  ans.push_back(2*c*(2*(min(x,y)/2)+a*(x-2*(min(x,y)/2))+b*(y-2*(min(x,y)/2)));
  sort(ans.begin(),ans.end());
  cout << ans[0] << "\n";
}