#include <bits/stdc++.h>
using namespace std;
using ll = long long;
string char_to_string(char val) { return string(1, val); }
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int res = 100000007;
  for (int i = 1; i <= 100000; ++i) {
    int cnt = 2 * C * i + max({0, X - i}) * A + max({0, Y - i}) * B;
    if (res > cnt) {
      res = cnt;
    }
  }
  cout << res << endl;
}
