#include <bits/stdc++.h>
using namespace std;
using int64 = int_fast64_t;
using PAIR = pair<int, int>;
constexpr int INF = 1 << 30;
constexpr int64 LINF = 1LL << 60;
constexpr int MOD = 1e9 + 7;
constexpr int MAX_N = 1e5 + 1;
template <typename T>
void MACRO_VAR_Scan(T &t) {
  cin >> t;
}
template <typename First, typename... Rest>
void MACRO_VAR_Scan(First &first, Rest &...rest) {
  cin >> first;
  MACRO_VAR_Scan(rest...);
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ;
  int64 a, b, c, x, y;
  MACRO_VAR_Scan(a, b, c, x, y);
  ;
  int64 ans = min(x, y) / 2 * 2 * min(a + b, 2 * c);
  cerr << "ans"
       << ":" << (ans);
  cout << "\n";
  ;
  ;
  int64 mn = min(x, y);
  x -= mn;
  y -= mn;
  if (x > y)
    ans += (x - y) * min(a, 2 * c);
  else if (y > x)
    ans += (y - x) * min(b, 2 * c);
  cout << (ans);
  cout << "\n";
  ;
  return 0;
}
