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