#include <bits/stdc++.h>
using namespace std;
const long long int m = pow(10, 9) + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long int ans = 999999999;
  for (auto i = 0LL; i <= max(X, Y) * 2; i += 2) {
    long long int test = 0;
    test += i * C;
    if (0 < X - i / 2) test += (X - i / 2) * A;
    if (0 < Y - i / 2) test += (Y - i / 2) * B;
    ans = min(ans, test);
  }
  cout << ans << endl;
  return 0;
}
