#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
const ll INF = 1e16;
const ll MOD = 1e9 + 7;
int main() {
  int A, B, C, X, Y;
  int defo = 0;
  int loop = 0;
  int n = 0;
  int sum = 0;
  cin >> A;
  cin >> B;
  cin >> C;
  cin >> X;
  cin >> Y;
  defo = A * X + B * Y;
  if (X > Y)
    loop = X;
  else
    loop = Y;
  if (defo > loop * 2 * C) {
    sum = loop * 2 * C;
  } else {
    loop = min(X, Y);
    sum = (X - loop) * A + (Y - loop) * B + (2 * C * loop);
  }
  if (defo < sum) {
    sum = defo;
  }
  cout << sum << endl;
}
