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