#include <bits/stdc++.h>
using namespace std;
long long n, i, j, a, b, c, k, x, y;
int main() {
  cin >> a >> b >> c >> x >> y;
  k = a * x + b * y;
  if (x > y) {
    k = min(k, 2 * c * y + a * (x - y));
    k = min(k, 2 * c * x);
  } else {
    k = min(k, 2 * c * x + a * (y - x));
    k = min(k, 2 * c * y);
  }
  cout << k;
}
