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