#include <bits/stdc++.h>
using namespace std;
long long int A, B, C, X, Y;
signed main() {
  scanf("%lld %lld %lld %lld %lld", &A, &B, &C, &X, &Y);
  long long int ans = 0;
  if (2 * C < A + B) {
    ans = min(X, Y) * 2 * C;
    if (X - min(X, Y) > 0) {
      if (A < C)
        ans += A * (X - min(X, Y));
      else
        ans += 2 * C * (X - min(X, Y));
    }
    if (Y - min(X, Y) > 0) {
      if (B < C)
        ans += B * (Y - min(X, Y));
      else
        ans += 2 * C * (Y - min(X, Y));
    }
  } else {
    ans = X * A + Y * B;
  }
  printf("%lld\n", ans);
  return 0;
}
