#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, n, k, a, b, c, p, q, r, s, x, y, z;
  cin >> a >> b >> c >> x >> y;
  s = x * a + y * b;
  if (x == y) {
    r = (x + y) * c;
    k = min(s, r);
  } else if (x > y) {
    q = (y + y) * c + (x - y) * a;
    t = min(s, q);
    z = (x + x) * c;
    k = min(t, z);
  } else if (x < y) {
    p = (x + x) * c + (y - x) * a;
    t = min(s, p);
    z = (y + y) * c;
    k = min(t, z);
  }
  cout << k << endl;
  return 0;
}
