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