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