#include <bits/stdc++.h>
int main() {
  int A, B, C, X, Y;
  int price = 0;
  int amount = 0;
  scanf("%d %d %d %d %d", &A, &B, &C, &X, &Y);
  int minor, major;
  int cost;
  if (X > Y) {
    minor = Y;
    major = X;
    cost = A;
  } else {
    minor = X;
    major = Y;
    cost = B;
  }
  if (A + B >= 2 * C) {
    while (amount < minor) {
      amount += 2;
      price += 2 * C;
    }
    while (amount < major) {
      amount++;
      price += cost;
    }
  } else {
    price += A * X + B * Y;
  }
  printf("%d", price);
  return 0;
}
