#include <bits/stdc++.h>
using namespace std;
long long dx[4] = {0, 0, 1, -1};
long long dy[4] = {1, -1, 0, 0};
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << setprecision(12) << fixed;
}
void solve() {
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if ((a + b < 2 * c)) {
    {
      cout << x * a + y * b << "\n";
      return;
    };
  }
  long long k = min(x, y);
  long long ans = k * 2 * c;
  x -= k;
  y -= k;
  ans += x * a + y * b;
  cout << ans;
}
int main() {
  fast();
  long long t = 1;
  while (t--) {
    solve();
  }
}
