#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (x > y) {
    int z = 2 * y;
    int half1 = z * c;
    int d = x - y;
    int half2 = d * a;
    int ans1 = half1 + half2;
    cout << ans1 << endl;
  } else {
    int v = 2 * x;
    int s1 = v * c;
    int d2 = y - x;
    int s2 = d2 * b;
    int ans2 = s1 + s2;
    cout << ans2 << endl;
  }
  system("pause");
  return 0;
}
