#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  if (X == Y) {
    printf("%d\n", min(A * X + B * Y, 2 * C * X));
  }
  if (X < Y) {
    printf("%d\n",
           min(A * X + B * X, 2 * C * X) + min(B * (Y - X), 2 * C * (Y - X)));
  } else {
    printf("%d\n",
           min(A * Y + B * Y, 2 * C * Y) + min(A * (X - Y), 2 * C * (X - Y)));
  }
}
