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