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