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