#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, x, y, n, m, k;
  scanf("%lld %lld %lld %lld %lld", &a, &b, &c, &x, &y);
  n = c * max(x, y) * 2;
  m = a * x + b * y;
  if (x > y)
    k = c * y * 2 + a * (x - y);
  else if (x < y)
    k = c * x * 2 + a * (y - x);
  printf("%lld", min(min(n, m), k));
}
