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