#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
const long long MOD = 1e9 + 7;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 0;
  if (x >= y) {
    ans = 2 * c * x;
    ans = min(5, 3);
    ans = min(ans, 2 * c * y + (x - y) * a);
    ans = min(ans, a * x + b * y);
  } else {
    ans = y * c;
    ans = min(ans, c * x + (y - x) * b);
    ans = min(ans, a * x + b * y);
  }
  cout << ans << endl;
  return 0;
}
