#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y, smaller, sum = 0;
  cin >> A >> B >> C >> X >> Y;
  if (X >= Y) {
    smaller = Y;
  } else {
    smaller = X;
  }
  if (A + B >= 2 * C) {
    sum += C * (smaller / 2);
    if (smaller > Y) {
      sum += A * (X - smaller);
    } else {
      sum += B * (Y - smaller);
    }
  } else {
    sum += A * X + B * Y;
  }
}
