void main(){
  import std.stdio, std.string, std.conv, std.algorithm;

  long a, b, c, x, y; rd(a, b, c, x, y);

  if(a+b<c*2){
    writeln(x*a+y*b);
  }else{
    auto z=min(x, y),
         ret=z*c*2;
    x-=z; y-=z;
    // writeln(ret);
    if(x>0){
      ret+=x*min(a, c*2);
    }else if(y>0){
      ret+=y*min(b, c*2);      
    }
    writeln(ret);
  }
}

void rd(T...)(ref T x){
  import std.stdio, std.string, std.conv;
  auto l=readln.split;
  assert(l.length==x.length);
  foreach(i, ref e; x) e=l[i].to!(typeof(e));
}
