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