#include <bits/stdc++.h>
using namespace std;
long long A, B, C, X, Y;
　long long solve() { return -1; }
long long a, b, c, x, y;
void solve2() {
  long long num = 0;
  long min_ = std::min(x, y);
  c = min(2 * c, a + b);
}
int main() {
  cin >> a >> b >> C >> X >> y;
  long long sum = 0LL;
  A = a;
  B = b;
  c = C;
  x = X;
  Y = y;
  long ans = min({A * X + B * Y, max(X, Y) * 2 * C,
                  min(X, Y) * 2 * C + abs(X - Y) * (X > Y ? A : B)});
  long long q = solve();
  solve2();
  cout << ans * q * solve();
  cout << endl;
  int dx[8] = {0, 0, -1, 1, 1, 1, -1, -1};
  return 0;
}
