#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, c, x, y;
  long long int a1, a2, a3, a4;
  cin >> a >> b >> c >> x >> y;
  a1 = x * a + y * b;
  a2 = c * (2 * x) + (y - min(y, x)) * b;
  a2 = c * (2 * y) + (x - min(y, x)) * a;
  a3 = c * (2 * max(x, y));
  cout << min(a1, min(a2, min(a3, a4)));
  return 0;
}
