#include <bits/stdc++.h>
long long max(long long x, long long y) {
  if (x <= y)
    return y;
  else
    return x;
}
long long min(long long x, long long y) {
  if (x <= y)
    return x;
  else
    return y;
}
int main() {
  long long A, B, C, X, Y;
  scanf("%lld %lld %lld %lld %lld", A, B, C, X, Y);
  long long res = (X + Y) * (2 * C);
  long long ans = 0;
  if (A + B >= C) {
    ans += min(X, Y) * (2 * C);
    ans += (X - min(X, Y)) * A + (Y - min(X, Y)) * B;
  } else
    ans += A * X + B * Y;
  printf("%lld\n", min(res, ans));
}
