#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const long long INF = 1LL << 29;
const long long mod = 1e9 + 7;
int main() {
  long long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long ans = 0;
  if (A * X + B * Y > C * 2 * max(X, Y)) {
    cout << C * 2 * max(X, Y) << endl;
    return 0;
  }
  if (A + B > C * 2) {
    ans += min(X, Y) * 2 * C;
  } else {
    ans += min(X, Y) * (A + B);
  }
  if (X > Y) {
    ans += (X - Y) * A;
  } else {
    ans += (Y - X) * B;
  }
  cout << ans << endl;
  return 0;
}
