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