#include <bits/stdc++.h>
using namespace std;
long long GCD(long long x, long long y) { return y ? GCD(y, x % y) : x; }
int main() {
  long long A, B, C, X, Y;
  cin >> A >> B >> C;
  cin >> X >> Y;
  long long piz = (A + B < C * 2 ? A + B : C * 2);
  long long ans = min(X, Y) * piz;
  long long diff = abs(X - Y);
  if (A > C && B > C) {
    ans += diff * C * 2;
    cout << ans << endl;
    return 0;
  }
  if (X > Y)
    ans += diff * A;
  else
    ans += diff * B;
  cout << ans << endl;
  return 0;
}
