#include <bits/stdc++.h>
using namespace std;
inline void logger() { cout << endl; }
template <typename A, typename... B>
void logger(const A& a, const B&... b) {
  cout << a << " , ";
  logger(b...);
}
const long long MOD = 1000000007;
const long long MOD9 = 998244353;
const long long INF = MOD * MOD;
const int MAX = 100005;
int main() {
  int a, b, c;
  cin >> (a) >> (b) >> (c);
  int x, y;
  cin >> (x) >> (y);
  int res;
  if (a + b > c * 2) {
    if (x > y) {
      swap(x, y);
      swap(a, b);
    }
    res = x * c * 2;
    if (b > c * 2)
      res += (y - x) * c * 2;
    else
      res += (y - x) * b * 2;
  } else {
    res = a * x + b * y;
  }
  cout << (res) << endl;
}
