#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int m1, m2, s1, s2, s3, s4, min1, min2, min3;
  if (x != y) {
    m1 = min(x, y);
    s1 = m1 * (a + b);
    s2 = 2 * m1 * c;
    min1 = min(s1, s2);
    s3 = abs(x - y) * a;
    s4 = abs(x - y) * 2 * c;
    min2 = min(s3, s4);
    cout << min1 + min2 << endl;
  } else {
    min3 = min(x * (a + b), 2 * c * x);
    cout << min3 << endl;
  }
}
