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