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