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