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