#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 ans = 0;
  if ((A + B) > 2 * C) {
    if (A <= C) {
      ans = 2 * C * Y;
      if (Y < X) {
        ans += A * (X - Y);
      }
    } else if (B <= C) {
      ans = 2 * C * X;
      if (X < Y) {
        ans += B * (Y - X);
      }
    } else {
      ans = 2 * C * max(X, Y);
    }
  } else {
    ans = A * X + B * Y;
  }
  cout << ans << endl;
  return 0;
}
