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