#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int m = max(x, y);
  long long ans = INF;
  for (int i = 0; i <= m; i++) {
    long long tans = i * 2 * c + max(x - m, 0) * a + max(y - m, 0) * b;
    ans = min(tans, ans);
  }
  cout << ans << endl;
}
