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