#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
template <typename T>
T digit(T num) {
  T sum = 0;
  while (num) {
    sum += num % 10;
    num /= 10;
  }
  return sum;
}
template <typename T>
T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <typename T>
T lcm(T a, T b) {
  T g = gcd(a, b);
  return a / g * b;
}
template <typename T>
T power(T a, T b) {
  T tmp = 1;
  for (long long i = 0; i < b; ++i) {
    tmp *= a;
  }
  return tmp;
}
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  c *= 2;
  if (a * x + b * y > c * max(x, y)) {
    cout << c * max(x, y) << endl;
    ;
    return 0;
  }
  int ans = 0;
  if (a + b > c) {
    int tmp = min(x, y);
    ans += tmp * c;
    x -= tmp;
    y -= tmp;
  }
  ans += x * a + y * b;
  cout << ans << endl;
  return 0;
}
