#include <bits/stdc++.h>
#define rep(i,n)for(long long i=0;i<(n);i++)
using namespace std;
typedef long long ll;
const int MOD=1e9+7;
const int MAX = 510000;
const int INF = 1e9;
const double pi=acos(-1);

int main(){
  int a,b,c,x,y;
  cin >> a >> b >> c >> x >> y;
  int ans=0;
  if(x==y){
    if(2*c<=a && 2*c<=b){
      ans = x*2*c;
    }
    if(2*c>a && 2*c >b){
      ans = a*x+b*y;
    }
    if(2*c>a && 2*c <=b){
      ans=INF;
      rep(i,x+1){
        ans=min(2*c*i+(x-i)*a,ans);
      }
    }
    if(2*c<=a && 2*c >b){
      ans=INF;
      rep(i,x+1){
        ans=min(2*c*i+(y-i)*b,ans);
      }
    }
  }
  if(x>y){
    ans = y*min(a,2*c)+y*min(b,2*c);
    x-=y;
    ans += min(a*x,x*2*c);
  }
  if(x<y){
    ans = min((a+b)*x,x*2*c);
    y-=x;
    ans += min(b*y,y*2*c);
  }
  cout << ans << endl;
  return 0;
}
