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