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