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