#include <bits/stdc++.h>
using namespace std;
long long int modpow(long long int x, long long int n) {
  if (n == 0) {
    return 1;
  } else if (n % 2 == 0) {
    long long int h = modpow(x, n / 2);
    return h * h % (long long int)(1e9 + 7);
  } else {
    return x * modpow(x, n - 1) % (long long int)(1e9 + 7);
  }
}
int gcd(int a, int b) {
  if (a % b == 0)
    return (b);
  else
    return (gcd(b, a % b));
}
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int sa = X - Y, half = C / 2, cost = 0;
  cost = min(C * 2, A + B) * min(X, Y);
  if (sa >= 0) {
    cost += sa * min(A, half * 2);
  } else {
    sa *= -1;
    cost += sa * min(B, C * 2);
  }
  cout << cost << endl;
  return 0;
}
