#include <bits/stdc++.h>
int work(std::istream &in) {
  int A, B, C, X, Y;
  in >> A >> B >> C >> X >> Y;
  int m = INT_MAX;
  for (int k = (0), _i_end = (std::max(X, Y) + 1), _i_inc = (1); k < _i_end;
       k += _i_inc) {
    int i = std::max(0, X - k);
    int j = std::max(0, Y - k);
    int cost = i * A + j * B + 2 * k * C;
    m = std::min(m, cost);
  }
  return m;
}
struct testdata {
  const char *input;
  int expected;
};
int test() {
  int ret = 0;
  struct testdata testset[] {
    {"1500 2000 1600 3 2", 7900}, {"1500 2000 1900 3 2", 8500},
        {"1500 2000 500 90000 100000", 100000000},
  };
  const int TESTLEN = sizeof(testset) / sizeof(testset[0]);
  for (int i = 0; i < TESTLEN; ++i) {
    std::stringstream sin(testset[i].input);
    int actual = work(sin);
    if (actual != testset[i].expected) {
      fprintf(stderr, "ERROR: expected: %d, but actual %d\n",
              testset[i].expected, actual);
      ret = 1;
    }
  }
  return ret;
}
int main(int argc, char *argv[]) {
  std::cin.tie(nullptr);
  if (argc == 2 && strcmp("--test", argv[1]) == 0) {
    exit(test());
  }
  printf("%d\n", work(std::cin));
}
