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