#include <bits/stdc++.h>
int asc(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main(void) {
  int a, b, c, x, y;
  int total[3];
  scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
  total[0] = a * x + b * y;
  if (x > y) {
    total[1] = (2 * c * y) + a * (x - y);
    total[2] = 2 * c * x;
  } else {
    total[1] = (2 * c * x) + a * (y - x);
    total[2] = 2 * c * y;
  }
  qsort(total, 3, sizeof(int), asc);
  printf("%d\n", total[0]);
  return 0;
}
