#include <bits/stdc++.h>
using namespace std;
constexpr double PI = 3.14159265358979323846;
constexpr long long INF = 1 << 29;
constexpr long long MOD = (long long)1e9 + 7;
constexpr double EPS = 1e-7;
constexpr int dy[4] = {0, 1, 0, -1};
constexpr int dx[4] = {1, 0, -1, 0};
struct edge {
  long long to;
  long long cost;
};
int main() {
  long long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long ans = LLONG_MAX;
  for (long long ab = 0; ab <= max(X, Y) * 2; ab += 2) {
    long long x = X - ab / 2, y = Y - ab / 2;
    long long cost = long long(ab * C);
    if (x > 0) cost += long long(x * A);
    if (y > 0) cost += long long(y * B);
    if (cost < ans) ans = cost;
  }
  cout << ans << endl;
  return 0;
}
