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