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