#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int d;
  if (x > y) {
    d = (x - y) * a + y * 2 * c;
  } else {
    d = (y - x) * b + x * 2 * c;
  }
  int e = x * a + y * b;
  if (d > e) {
    cout << d;
  } else {
    cout << e;
  }
}
