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