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