#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  int ans = 0;
  cin >> a >> b >> c >> x >> y;
  ans = min((c * y * 2 + min(2 * c, a) * (x - y)),
            min(c * 2 * x + min(2 * c, b) * (y - x), a * x + b * y));
  cout << ans << endl;
  return 0;
}
