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