#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;
  if (a + b < 2 * c)
    return cout << a * x + b * y, 0;
  else if (x > y)
    return cout << min(2 * y * c + a * (x - y), 2 * x * c), 0;
  else
    cout << min(2 * y * c + b * (y - x), 2 * y * c), 0;
}
