#include <bits/stdc++.h>
using namespace std;
long long INFL = 1000000000000000010;
int INF = 2147483600;
long long MOD = 1000000007;
double m = 0.00000001;
int main(void) {
  int A, B, C;
  cin >> A >> B >> C;
  int X, Y;
  cin >> X >> Y;
  int ans = INF;
  ans = min(ans, X * A + Y * B);
  if (X == Y) {
    ans = min(ans, C * (X + Y));
  }
  if (X > Y) {
    ans = min(ans, C * (Y + Y) + A * (X - Y));
  }
  if (X < Y) {
    ans = min(ans, C * (X + X) + A * (Y - X));
  }
  if (X > Y) {
    ans = min(ans, C * (X + X));
  }
  if (X < Y) {
    ans = min(ans, C * (Y + Y));
  }
  cout << ans << endl;
}
