#include <bits/stdc++.h>
using ll = long long int;
using namespace std;
double pi = 3.141592653589793238;
int main() {
  ll A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  ll ans = 0;
  if (A > 2 * C) {
    if (B > 2 * C) {
      ans = max(X, Y) * 2 * C;
    } else {
      ans = 2 * C * X + B * max(Y - 2 * X, 0LL);
    }
  } else {
    if (B > 2 * C) {
      ans = 2 * C * Y + A * max(X - 2 * Y, 0LL);
    } else {
      if (A + B > 2 * C) {
        if (X > Y) {
          ans = 2 * Y * C + A * (X - Y);
        } else {
          ans = 2 * X * C + B * (Y - X);
        }
      } else {
        ans = X * A + Y * B;
      }
    }
  }
  cout << ans;
}
