#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, x, y, res;
  cin >> a >> b >> c >> x >> y;
  res = max(a, max(b, c)) * max(x, y) + 1;
  if (x <= y) {
    for (int i = 0; i <= x; ++i) {
      long long ap = i * a;
      long long ab = (x - i) * 2 * c;
      long long bp = (y - (x - i)) * b;
      res = min(res, ap + ab + bp);
    }
  } else {
    for (int i = 0; i <= y; ++i) {
      long long bp = i * b;
      long long ab = (y - i) * 2 * c;
      long long ap = (x - (y - i)) * a;
      res = min(res, ap + ab + bp);
    }
  }
  if (2 * max(x, y) * c < res) {
    res = 2 * max(x, y) * c;
  }
  cout << res << endl;
  return 0;
}
