#include <bits/stdc++.h>
using namespace std;
long long gcd(long long s, long long b) {
  if (b == 0) return s;
  return gcd(b, s % b);
}
signed main() {
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long ans = 0;
  if ((a + b) / 2 > c) {
    if (x > y) {
      ans += c * y * 2;
      ans += (x - y) * a;
      cout << ans << endl;
    } else {
      ans += c * x * 2;
      ans += (y - x) * b;
      cout << ans << endl;
    }
  } else {
    cout << a * x + b * y << endl;
  }
}
