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