#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long a, b, c, x, y, z;
int32_t main() {
  ios_base::sync_with_stdio();
  cin.tie();
  cout.tie();
  ;
  cin >> a;
  cin >> b;
  cin >> c;
  cin >> x;
  cin >> y;
  if (x > y) {
    z = y * min(a + b, c * 2) + (x - y) * min(a, c * 2);
  } else {
    z = x * min(a + b, c * 2) + abs(x - y) * min(a, c * 2);
  }
  cout << min(z, max(x, y) * c * 2);
}
