#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
void printb(unsigned long long v) {
  unsigned long long mask = (long long)1 << (sizeof(v) * CHAR_BIT - 1);
  do putchar(mask & v ? '1' : '0');
  while (mask >>= 1);
}
void putb(unsigned long long v) {
  putchar('0'), putchar('b'), printb(v), putchar('\n');
}
signed main() {
  long long A, B, C, X, Y, ans = 100000000000;
  cin >> A >> B >> C >> X >> Y;
  for (long long i = 0; i < (max(X, Y) + 1); ++i) {
    if (X > i && Y > i)
      chmin(ans, A * (X - i) + B * (Y - i) + 2 * C * i);
    else if (X > i)
      chmin(ans, A * (X - i) + 2 * C * i);
    else
      chmin(ans, B * (Y - i) + 2 * C * i);
  }
  cout << ans << endl;
  return 0;
}
