#include <bits/stdc++.h>
using namespace std;
long long int n = 0, m = 0, ans = 0, sum = 0, cnt = 0, tmp = 0;
string s;
bool flag;
int main(void) {
  long long int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (a + b < 2 * c) {
    ans += a * x + b * y;
  } else {
    ans += min(x, y) * c * 2;
    if (x > y) {
      if (2 * c > x) {
        ans += (x - y) * a;
      } else {
        ans += (x - y) * c * 2;
      }
    } else {
      if (2 * c > y) {
        ans += (y - x) * b;
      } else {
        ans += (y - x) * c * 2;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
