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