#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 (X >= Y) {
    if (A >= 2 * C) {
      ans += X * C * 2;
    } else if (A + B >= 2 * C) {
      ans += (Y * C * 2 + A * (X - Y));
    } else {
      ans += (A * X + B * Y);
    }
  } else {
    if (B >= 2 * C) {
      ans += Y * C * 2;
    } else if (A + B >= 2 * C) {
      ans += (X * C * 2 + A * (Y - X));
    } else {
      ans += (A * X + B * Y);
    }
  }
  cout << ans << endl;
}
