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