#include <bits/stdc++.h>
int min(int a, int b) {
  if (a < b) {
    return a;
  } else {
    return b;
  }
}
int main(void) {
  int A = 0, B = 0, C = 0, X = 0, Y = 0, ans = 0;
  scanf("%d%d%d%d%d", &A, &B, &C, &X, &Y);
  int pay_a = A * X + B * Y;
  int pay_b = 0;
  if (X > Y) {
    pay_b = Y * C * 2 + A * (X - Y);
  } else {
    pay_b = X * C * 2 + B * (Y - X);
  }
  int pay_c = 0;
  pay_c = C * 2 * (X + Y);
  int pay = min(pay_a, pay_b);
  pay = min(pay, pay_c);
  printf("%d", pay);
  return 0;
}
