#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const double PI = 3.141592653589793238463;
const long long N = 2e5 + 9;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int mn = min(x, y);
  long long ans = 0;
  if (c * 2 <= a + b) {
    ans = c * 2 * mn;
    x -= mn, y -= mn;
    if (x) {
      if (c * 2 <= a)
        ans = ans + 2 * c * x;
      else
        ans += a;
    } else if (y) {
      if (c * 2 <= b)
        ans = ans + 2 * c * y;
      else
        ans += b;
    }
    cout << ans << '\n';
  } else
    cout << a * x + b * y << '\n';
  return 0;
}
