#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long int z = min(x, y);
  long long int ab = c * z * 2;
  if (x > y)
    ab += (x - y) * a;
  else
    ab += (y - x) * b;
  long long int m = a * x + b * y;
  cout << min(m, ab);
}
