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