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