#include <bits/stdc++.h>
const long long MOD = 1e9 + 7;
using namespace std;
template <typename T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <typename T>
T lcm(T a, T b) {
  return a * b / gcd(a, b);
}
template <typename T>
T finder(vector<T> vec, T number) {
  auto itr = find(vec.begin(), vec.end(), number);
  size_t index = distance(vec.begin(), itr);
  if (index != vec.size()) {
    return 1;
  } else {
    return 0;
  }
}
long long frac(long long n) {
  if (n == 0) {
    return 1;
  }
  return (n * frac(n - 1)) % MOD;
}
int main() {
  long long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long ans = 0;
  if ((A + B) >= C * 2) {
    if (X > Y) {
      ans += C * 2 * Y;
      if (A >= C * 2)
        ans += 2 * C * (X - Y);
      else
        ans += A * (X - Y);
    } else {
      ans += C * 2 * X;
      if (B >= C * 2)
        ans += 2 * C * (Y - X);
      else
        ans += B * (X - Y);
    }
  } else {
    ans += A * X;
    ans += B * Y;
  }
  cout << ans << endl;
}
