#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
const double EPS = 1e-10;
const double PI = acos(-1.0);
const long long MOD = 1000000007;
template <class T>
inline T isPrime(T x) {
  bool ret = true;
  if (x < 2) {
    ret = false;
  }
  for (long long i = 2; i <= sqrt(x); i++) {
    if (x % i == 0) {
      ret = false;
    }
  }
  return ret;
}
struct UnionFind {
  vector<int> par;
  UnionFind(int N) : par(N) {
    for (int i = 0; i < N; i++) par[i] = i;
  }
  int root(int x) {
    if (par[x] == x) return x;
    return par[x] = root(par[x]);
  }
  void unite(int x, int y) {
    int rx = root(x);
    int ry = root(y);
    if (rx == ry) return;
    par[rx] = ry;
  }
  bool same(int x, int y) {
    int rx = root(x);
    int ry = root(y);
    return rx == ry;
  }
};
int main(int argc, char const* argv[]) {
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long mi = a * x + b * y;
  if (x > y) {
    mi = min(mi, 2 * x * c);
    mi = min(mi, 2 * y * c + a * (x - y));
  } else {
    mi = min(mi, 2 * y * c);
    mi = min(mi, 2 * x * c + a * (y - x));
  }
  cout << mi << endl;
  return 0;
}
