#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
long long int lcm(long long int a, long long int b) {
  return a / gcd(a, b) * b;
}
const long long int INF = 1e8;
signed main() {
  long long int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long int ans = 0;
  if (A + B >= 2 * C) {
    long long int common = min(X, Y);
    ans += common * C * 2;
    if (X > Y) {
      if (A >= 2 * C)
        ans += (X - common) * C * 2;
      else
        ans += (X - common) * A;
    } else if (X < Y) {
      if (A >= C * 2)
        ans += (Y - common) * C * 2;
      else
        ans += (Y - common) * B;
    }
  } else
    ans = A * X + B * Y;
  cout << ans;
}
