#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;
const double PI = acos(-1.0);
bool compare_by_b(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.second != b.second)
    return a.second < b.second;
  else
    return a.first < b.first;
}
void solve(long long A, long long B, long long C, long long X, long long Y) {
  long long ans = 10e14;
  for (int i = (0); i < (2 * min(X, Y) + 2); ++i) {
    long long x = max(0LL, X - (long long)i);
    long long y = max(0LL, Y - (long long)i);
    ans = min(ans, 2 * i * C + x * A + y * B);
  }
  cout << ans << endl;
}
int main() {
  long long A;
  scanf("%lld", &A);
  long long B;
  scanf("%lld", &B);
  long long C;
  scanf("%lld", &C);
  long long X;
  scanf("%lld", &X);
  long long Y;
  scanf("%lld", &Y);
  solve(A, B, C, X, Y);
  return 0;
}
