#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using vi = vector<int>;
using vl = vector<ll>;
using vb = vector<bool>;
using vc = vector<char>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
using vvb = vector<vector<bool>>;
using vvc = vector<vector<char>>;
using vvs = vector<vector<string>>;
const int INF = 1e9;
const ll LINF = 1e18;
inline void yn(bool f) { cout << (f ? "Yes" : "No") << endl; }
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  ll sum = 0;
  if (x > y) {
    if (a >= c * 2) {
      sum += x * c * 2;
    } else if (a + b >= c * 2) {
      sum += (x - y) * a;
      sum += y * c * 2;
    } else {
      sum += x * a;
      sum += y * b;
    }
  } else {
    if (b >= c * 2) {
      sum += y * c * 2;
    } else if (a + b >= c * 2) {
      sum += (y - x) * a;
      sum += x * c * 2;
    } else {
      sum += x * a;
      sum += y * b;
    }
  }
  cout << sum << endl;
  return 0;
}
