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