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