#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, X, Y;
  cin >> a >> b >> c >> X >> Y;
  int res = 1e9;
  for (int AB = 0; AB <= 2 * max(a, b); AB += 2) {
    int tmp = 0;
    tmp += AB * c;
    int aa = X - AB / 2;
    int bb = Y - AB / 2;
    if (aa < 0 || bb < 0) continue;
    tmp += aa * a;
    tmp += bb * b;
    res = min(res, tmp);
  }
  cout << res << endl;
}
