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