#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007LL;
int A[105][105];
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long ans = 0;
  if (X < Y) {
    if (A + B > 2 * C)
      ans += C * 2 * X;
    else
      ans += (A + B) * X;
    Y -= X;
    X = 0;
  } else {
    if (A + B > 2 * C)
      ans += C * 2 * Y;
    else
      ans += (A + B) * Y;
    X -= Y;
    Y = 0;
  }
  if (X > 0) {
    if (A > 2 * C)
      ans += 2 * C * X;
    else
      ans += A * X;
  }
  if (Y > 0) {
    if (B > 2 * C)
      ans += 2 * C * Y;
    else
      ans += A * Y;
  }
  cout << ans << "\n";
  return 0;
}
