#include <bits/stdc++.h>
using namespace std;
int main() {
  long long A, B, C, x, y;
  cin >> A >> B >> C >> x >> y;
  long long a, b, c;
  if (true) {
    a = A * x + B * y;
  }
  if (true) {
    int X = max(x, y);
    X = X * 2;
    b = X * C;
  }
  if (true) {
    int X = x, Y = y, bb;
    bb = min(X, Y);
    bb = bb / 2 * 2;
    X -= bb;
    Y -= bb;
    bb = bb * 2;
    c = X * A + Y * B + bb * C;
  }
  cout << min(a, min(b, c));
  return 0;
}
