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