#include <bits/stdc++.h>
using namespace std;
const long long mei = (long long)1e9 + 7;
int main() {
  long long a, b, c, x, y, s, t, u;
  cin >> a >> b >> c;
  cin >> x >> y;
  s = 99999999999;
  for (long long i = 0; i < (long long)(x + 1); i++) {
    t = 2 * (x - i);
    u = y - t / 2;
    s = min(s, i * a + t * c + u * b);
  }
  cout << s;
  cout << endl;
}
