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