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