#include <bits/stdc++.h>
int main() {
  int A, B, C, X, Y, money;
  scanf("%d%d%d%d%d", &A, &B, &C, &X, &Y);
  if ((A + B) <= 2 * C) {
    money = A * X + B * Y;
  } else {
    if (X > Y) {
      money = (2 * C * Y) + (X - Y);
    } else {
      money = (2 * C * X) + (Y - X);
    }
  }
  printf("%d", money);
  return 0;
}
