#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int A, B, C, X, Y, P = 100000000, a, b, k;
  cin >> A >> B >> C >> X >> Y;
  if (A >= C * 2 && B >= C * 2) {
    P = C * max(X, Y) * 2;
  } else if (A + B < C * 2) {
    P = A * X + B * Y;
  } else {
    if (X >= Y) {
      P = C * Y * 2 + A * (X - Y);
    } else {
      P = C * X * 2 + B * (Y - X);
    }
  }
  cout << P;
}
