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