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