#include <bits/stdc++.h>
using namespace std;

int main(){
  int a,b,c,x,y;
  cin>>a>>b>>c>>x>>y;
  int j;
  if((a+b)<c*2)j=0;
  else if(a>c&&b>c)j=2;
  else j=1;

  if(j===0){
    cout<<x*a+y*b<<endl;
  }
  else if(j==1){
    if(x>y)cout<<c*y*2+a*(x-y)<<endl;
    else if(x<y)cout<<c*x*2+b*(y-x)<<endl;
    else cout<<c*x*2<<endl;
  }
  else {
    if(x>y)cout<<c*x*2<<endl;
    else cout<<c*y*2<<endl;
  }
  return 0;
}
