#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 1001001001;
  for (int i = 0; i <= 100000; ++i) {
    int A = i * a;
    int AB = (x - i) * 2;
    int C = AB * c;
    int B = 0;
    if (AB / 2 > y)
      B = y * b;
    else
      B = (y - (AB / 2)) * b;
    int sum = A + B + C;
    ans = min(ans, sum);
  }
  cout << ans << endl;
  return 0;
}
