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