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