#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int t = a * x + b * y;
  int k;
  int o;
  if (x > y) {
    k = c * 2 * x;
    o = c * 2 * y + a * (x - y);
  } else if (x = y) {
    k = c * 2 * x;
    o = c * 2 * x;
  } else if (x > y) {
    k = c * 2 * y;
    o = c * 2 * x + b * (y - x);
  }
  int min = (t <= k ? t : k);
  int min0 = (min <= o ? min : o);
  cout << min0 << endl;
}
