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