#include <bits/stdc++.h>
using namespace std;
int keta(long long A) {
  int cnt = 0;
  while (A) {
    cnt++;
    A /= 10;
  }
  return cnt;
}
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int ans = A * X + B * Y;
  ans = min(ans, C * max(X, Y) * 2);
  if (X > Y) {
    ans = min(ans, 2 * C * Y + X * (X - Y));
  } else {
    ans = min(ans, 2 * C * X + X * (-X + Y));
  }
  ans = min(ans, C * max(X, Y) * 2);
  cout << ans << endl;
  return 0;
}
