#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, x, y, m1, m2, m3;
  cin >> a >> b >> c >> x >> y;
  long long z = min(x, y);
  long long d;
  if (x > y)
    d = (x - y) * a;
  else
    d = (y - x) * b;
  m2 = d + (z * 2 * c);
  m3 = max(x, y) * 2 * c;
  m1 = a * x + b * y;
  m1 = min(m1, m2);
  m1 = min(m1, m3);
  cout << m3 << endl;
  return 0;
}
