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