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