#include<bits/stdc++.h>
using namespace std;
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a,b,c,x,y,ans;
  cin>>a>>b>>c>>x>>y;
  ans=2*(x+y)*(a+b+2*c);
  ans=min(ans,a*x+b*y);
  ans=min(ans,2*c*x+max(0,y-x)*b);
  ans=min(ans,2*c*max(x,y));
  ans=min(ans,2*c*y+a*max(x-y,0));
  ans=min(a*x+2*c*y);
  ans=min(2*c*x+b*y);
  cout<<ans;
}