#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const* argv[]) {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int a, b, c, d;
  a = (A * X) + (B * Y);
  if (X > Y) {
    b = (Y * 2 * C) + ((X - Y) * A);
  } else if (X < Y) {
    b = (X * 2 * C) + ((Y - X) * B);
    c = (Y * 2 * C);
    if (b > c) {
      d = c;
    } else {
      d = b;
    }
  }
  if (a > d) {
    cout << d << endl;
    return 0;
  } else {
    cout << a << endl;
    return 0;
  }
  return 0;
}
