#include <bits/stdc++.h>
int main() {
  long long a, b, c, x, y, e, f, g;
  scanf("%lld %lld %lld %lld %lld", &a, &b, &c, &x, &y);
  g = (a * x) + (b * y);
  if (x > y) {
    e = (2 * x) * c;
    f = ((2 * y) * c) + ((x - y) * a);
  }
  if (y > x) {
    e = (2 * y) * c;
    f = ((2 * x) * c) + ((y - x) * b);
  }
  if (e <= g && e <= f) printf("%lld\n", e);
  if (f <= e && f <= g) printf("%lld\n", f);
  if (g <= e && g <= f) printf("%lld\n", g);
  return 0;
}
