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