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