#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  C *= 2;
  int ans = 0;
  if (X >= Y) {
    ans = A * X + B * Y;
    ans = min(ans, C * X);
    ans = min(ans, C * Y + A * (X - Y));
  } else {
    ans = A * X + B * Y;
    ans = min(ans, C * Y);
    ans = min(ans, C * X + A * (Y - X));
  }
  cout << ans << endl;
}
