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