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