#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, c, d, e, f, g, h, i, j;
  long long int x, y;
  long long int ans, cnt;
  cin >> a >> b >> c >> x >> y;
  ans = a * x + b * y;
  ans = min(ans, 2 * c * max(a, b));
  if (x >= y) {
    ans = min(2 * c * y + a * (x - y), ans);
  } else {
    ans = min(2 * c * x + b * (y - x), ans);
  }
  cout << ans << endl;
}
