#include <bits/stdc++.h>
using namespace std;
const long long int m = pow(10, 9) + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int a, b, c, x, y, ans = 0;
  cin >> a >> b >> c >> x >> y;
  if (a + b > c * 2) {
    long long int m = min(x, y);
    x -= m;
    y -= m;
    m *= 2;
    ans += m * c;
    if (x != 0) {
      if (a < 2 * c)
        ans += a * x;
      else
        ans += c * x * 2;
    }
    if (y != 0) {
      if (b < 2 * c)
        ans += b * y;
      else
        ans += c * y * 2;
    }
    cout << ans << endl;
  }
  if (a + b < c * 2) {
    ans += a * x + y * b;
    cout << ans << endl;
  }
  return 0;
}
