#include <bits/stdc++.h>
int main() {
  int a, b, c, x, y;
  long long each, norem1, norem2, rem1, rem2, min1, min2;
  scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
  each = (a * x) + (b * y);
  if (x < y) {
    rem1 = (2 * c * x) + (b * (y - x));
    norem1 = 2 * c * y;
    min1 = ((rem1) < (norem1) ? (rem1) : (norem1));
  } else if (x > y) {
    rem2 = (2 * c * y) + (a * (x - y));
    norem2 = 2 * c * x;
    min2 = ((rem2) < (norem2) ? (rem2) : (norem2));
  }
  printf("%lld\n", ((each) < (((min1) < (min2) ? (min1) : (min2)))
                        ? (each)
                        : (((min1) < (min2) ? (min1) : (min2)))));
  return 0;
}
