#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long A, B, C, X, Y;
  long long num_a, num_b, num_c;
  cin >> A >> B >> C >> X >> Y;
  long long sum = 0;
  if (2 * C < A + B) {
    if (X > Y) {
      num_c = 2 * Y;
      long long need_a = X - Y;
      if (A > 2 * C) {
        sum = 2 * C * max(X, Y);
      } else {
        sum = C * num_c + A * need_a;
      }
    }
    if (X <= Y) {
      num_c = 2 * Y;
      long long need_b = Y - X;
      if (B > 2 * C) {
        sum = 2 * C * max(X, Y);
      } else {
        sum = C * num_c + B * need_b;
      }
    }
  } else {
    sum = A * X + B * Y;
  }
  cout << sum << endl;
  return 0;
}
