#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int sum = 0;
  if (max(X, Y) * 2 * C <= A * X + B * Y) {
    sum = max(X, Y) * 2 * C;
    cout << sum << endl;
    return 0;
  } else if (A + B > 2 * C) {
    sum = min(X, Y) * C * 2;
    int Z = min(X, Y);
    X -= Z;
    Y -= Z;
    sum += X * A + (Y * B);
    cout << sum << endl;
    return 0;
  } else if (A + B <= 2 * C) {
    sum = A * X + B * Y;
    cout << sum << endl;
    return 0;
  }
}
