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