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