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