#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;
  if (x < y) {
    max = y;
    maxc = b;
    min = x;
  } else {
    max = x;
    maxc = a;
    min = y;
  }
  int total;
  if (a > 2 * c || b > 2 * c)
    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;
}
