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