#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 max, min, maxc, minc;
  max = x > y ? x : y;
  min = x > y ? y : x;
  maxc = x > y ? a : b;
  minc = x > y ? b : a;
  int total;
  if (a >= 2 * c || b >= 2 * c) {
    if (a <= 2 * c || b <= 2 * c)
      total = 2 * c * min + minc * (max - min);
    else
      total = 2 * c * max;
  } else if (a + b < 2 * c)
    total = a * x + b * y;
  else
    total = 2 * c * min + (max - min) * maxc;
  printf("%d\n", total);
  return 0;
}
