#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(false);
  long long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  bool isABcheap = false;
  bool allAB = false;
  if (A + B > 2 * C) isABcheap = true;
  if ((X > Y and X > 2 * C) or X < Y and Y > 2 * C) allAB = true;
  long long res = 0;
  if (isABcheap) {
    long long num = min(X, Y);
    if (allAB) num = max(X, Y);
    res += num * 2 * C;
    X -= num;
    Y -= num;
  }
  if (X > 0) res += A * X;
  if (Y > 0) res += B * Y;
  cout << res << endl;
}
