#include <bits/stdc++.h>
int main(void) {
  int a, b, c, x, y;
  scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
  int an = x, bn = y, cn = 0;
  int total;
  total = an * a + bn * b;
  int i;
  for (i = 0;; ++i) {
    an -= 1;
    bn -= 1;
    cn += 2;
    if (an < 0 || bn < 0) break;
    if (total > an * a + bn * b + cn * c)
      total = an * a + bn * b + cn * c;
    else
      break;
  }
  printf("%d\n", total);
  return 0;
}
