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