#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << setprecision(32);
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = x * a + y * b;
  for (int z = 0; z <= 2 * x && z <= 2 * y; z++) {
    ans = min(ans, z * c + (x - z / 2) * a + (y - z / 2) * b);
  }
  cout << ans << endl;
  return 0;
}
