#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  long long c;
  while (a != 0) {
    c = a;
    a = b % a;
    b = c;
  }
  return b;
}
int main() {
  long long A, B, C, X, Y, Z;
  long long D = 0;
  long long sum = 0;
  cin >> A >> B >> C >> X >> Y;
  Z = Y;
  if (X > Y) {
    D = Y;
    Y = X;
    X = D;
    D = B;
    B = A;
    A = D;
  }
  if (C * 2 < A + B) {
    Y -= X;
    sum = X * C * 2;
    sum += Y * B;
  } else {
    sum = A * X + B * Y;
  }
  if (C * Z * 2 < sum) sum = C * Y * 2;
  cout << sum;
  return 0;
}
