#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b != 0 ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
int main() {
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (a + b <= 2 * c)
    cout << x * a + y * b << endl;
  else {
    long long ans = min(x, y) * c;
    if (x <= y) {
      if (b <= 2 * c)
        ans += b * (y - x);
      else
        ans += 2 * c * (y - x);
    } else {
      if (a <= 2 * c)
        ans += a * (x - y);
      else
        ans += 2 * c * (x - y);
    }
    cout << ans << endl;
  }
  return 0;
}
