import std.stdio, std.string, std.conv, std.array, std.algorithm;

void main()
{
  long a, b, c, x, y;
  readf("%d %d %d %d %d", &a, &b, &c, &x, &y);

  if (a + b < 2 * c) {
    writeln(a * x + b * y);
    return;
  }
  long n = min(x, y);
  long ans = n * 2 * c;
  x -= n; y -= n;
  ans += min(a * x + y * b, max(x, y) * 2 * c);

  writeln(ans);
}
