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