#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
using V = vector<T>;
const int INF = 1e9;
const int MOD = 1000000007;
using Graph = vector<vector<int>>;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long res = 0;
  if (min(min(a, b), c) == c) {
    res = min(max(x, y) * 2 * c, a * x + b * y);
  } else {
    if (x < y) {
      res = min(x * 2 * c + abs(x - y) * b, a * x + b * y);
    } else {
      res = min(y * 2 * c + abs(x - y) * a, a * x + b * y);
    }
  }
  cout << res << "\n";
}
