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