import std.algorithm, std.container, std.conv, std.math, std.range, std.typecons, std.stdio, std.string;

auto rdsp(){return readln.splitter;}
void pick(R,T)(ref R r,ref T t){t=r.front.to!T;r.popFront;}
void readV(T...)(ref T t){auto r=rdsp;foreach(ref v;t)pick(r,v);}

void main()
{
  int a, b, c, x, y; readV(a, b, c, x, y);

  auto ans = 10^^9;
  foreach (nc; 0..2*max(x,y)+1) {
    auto na = max(0, x-nc/2), nb = max(0, y-nc/2);
    ans = min(ans, na*a+nb*b+nc*c);
  }
  writeln(ans);
}
