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