#include <bits/stdc++.h>
using namespace std;
using ll = long long;
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) * C * 2 << endl;
    return 0;
  } else if (A + B >= C * 2 && X >= Y) {
    cout << Y * C * 2 + (X - Y) * A;
    return 0;
  } else if (A + B >= C * 2 && Y >= X) {
    cout << X * C * 2 + (Y - X) * B;
    return 0;
  } else {
    cout << A * X + B * Y;
    return 0;
  }
}
