#include <bits/stdc++.h>
int main(void) {
  int A, B, C, X, Y;
  int nokori;
  int money;
  do {
    scanf("%d", &A);
    scanf("%d", &B);
    scanf("%d", &C);
    scanf("%d", &X);
    scanf("%d", &Y);
  } while (A < 1 || A > 5000 || B < 1 || B > 5000 || C < 1 || C > 5000 ||
           X < 1 || X > 100000 || Y < 1 || Y > 100000);
  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;
  }
  printf("%d", money);
}
