#include <bits/stdc++.h>
using namespace std;
int main() {
  long long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int M = max(X, Y);
  long long res = 100000000;
  long long p, q;
  long long r = 0;
  while (r <= 2 * M) {
    p = X - r / 2;
    q = Y - r / 2;
    if (p < 0) p = 0;
    if (q < 0) q = 0;
    res = min(res, A * p + B * q + C * r);
    r = r + 2;
  }
  cout << res << endl;
}
