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