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