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