#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long LINF = 1e18;
const double EPS = 1e-9;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 0;
  if (a + b < 2 * c) {
    ans = a * x + b * y;
  } else if (a >= 2 * c && b >= 2 * c) {
    ans = 2 * c * max(x, y);
  } else {
    ans = 2 * c * min(x, y) + a * (x - min(x, y)) + b * (y - min(x, y));
  }
  cout << ans << endl;
  return 0;
}
