#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
const int MAX = 510000;
const int INF = 1e9;
const double pi = acos(-1);
struct UnionFind {
  vector<int> par;
  UnionFind(int n) : par(n, -1) {}
  int root(int x) {
    if (par[x] < 0)
      return x;
    else
      return par[x] = root(par[x]);
  }
  bool issame(int x, int y) { return root(x) == root(y); }
  bool merge(int x, int y) {
    x = root(x);
    y = root(y);
    if (x == y) return false;
    if (par[x] > par[y]) swap(x, y);
    par[x] += par[y];
    par[y] = x;
    return true;
  }
  int size(int x) { return -par[root(x)]; }
};
int main() {
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long ans = INF;
  for (long long i = 0; i < (max(x, y)); i++) {
    ans = min(ans, i * 2 * c + max(x - i, 0ll) * a + max(y - i, 0ll) * b);
  }
  cout << ans << endl;
  return 0;
}
