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