#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y, S, T, U, V, W, I, J;
  cin >> A >> B >> C >> X >> Y;
  S = A * X;
  T = B * Y;
  V = 2 * C;
  if (X < Y) {
    U = V * X;
    I = Y - X;
    J = B * I;
  } else if (X > Y) {
    U = V * Y;
    I = X - Y;
    J = A * I;
  }
  if (S + T < U + J) {
    cout << S + T << endl;
  } else {
    cout << U + J << endl;
  }
  return 0;
}
