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