#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
constexpr char ln = '\n';
constexpr long long MOD = 1000000007LL;
constexpr long long INF = 1000000000LL;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  int aa, bb, ab, x, y;
  cin >> aa >> bb >> ab >> x >> y;
  x *= 2;
  y *= 2;
  int res = 0;
  if (2 * ab < aa + bb) {
    res += min(x, y) * ab;
    int value;
    if (x > y)
      value = aa;
    else
      value = bb;
    if (value < 2 * ab)
      res += value * abs(x - y) / 2;
    else
      res += 2 * ab * abs(x - y);
  } else {
    res += aa * x / 2 + bb * y / 2;
  }
  cout << res << ln;
}
