#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  long long ans, ans1 = 0, ans2 = 0;
  map<int, int> mp;
  mp[x] = a;
  mp[y] = b;
  cin >> a >> b >> c >> x >> y;
  if (a + b < 2 * c) {
    cout << a * x + b * y << endl;
    return 0;
  } else {
    ans1 += c * 2 * min(x, y) + mp[max(x, y)] * abs(x - y);
    ans2 += c * 2 * max(x, y);
    ans = min(ans1, ans2);
    cout << ans << endl;
    return 0;
  }
}
