#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const long long INF = 1LL << 60;
const ll C = 1000000000 + 7;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  if (C * 2 <= A && C * 2 <= B) {
    cout << max(X, Y) * 2 * C << endl;
    return 0;
  }
  if (C * 2 <= A + B && X >= Y) {
    cout << min(X, Y) * 2 * C + abs(X - Y) * A << endl;
    return 0;
  }
  if (C * 2 <= A + B && X <= Y) {
    cout << min(X, Y) * 2 * C + abs(X - Y) * B << endl;
    return 0;
  }
  if (C * 2 >= A + B) {
    cout << A * X + B * Y << endl;
    return 0;
  }
}
