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