#include <bits/stdc++.h>
using namespace std;
int A, B, C, X, Y, ans;
int main() {
  cin >> A >> B >> C >> X >> Y;
  int AX = A * X;
  int BY = B * Y;
  if (AX + BY >= 2 * C * max(X, Y)) {
    ans = 2 * C * max(X, Y);
  } else if (A * min(X, Y) + B * min(X, Y) < C * 2 * min(X, Y)) {
    ans = AX + BY;
  } else {
    ans = C * 2 * min(X, Y);
    ans += max(((X - min(X, Y)) * A), ((Y - min(X, Y)) * B));
  }
  cout << ans << endl;
}
