#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
signed main() {
  long long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long ans1 = 0, ans2 = 0, ans3 = 0;
  ans1 = A * X + B * Y;
  ans2 = max(X, Y) * C * 2;
  if (X > Y)
    ans3 = Y * C * 2 + (X - Y) * A;
  else if (X < Y)
    ans3 = X * C * 2 + (Y - X) * B;
  cout << min({ans1, ans2, ans3}) << endl;
  return 0;
}
