#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, c, d, e, f, g, h, i, j;
  long long int x, y;
  long long int ans = 0, sum = 0;
  cin >> a >> b >> c >> x >> y;
  d = a + b;
  e = c * 2;
  if (e < d) {
    f = min(x, y);
    x -= f;
    y -= f;
    f /= 2;
    ans += (f * 2) * e;
    if (x > 0) {
      if (a > 2 * c) {
        ans += (e * x);
      } else {
        ans += (x * a);
      }
    } else {
      if (b > 2 * c) {
        ans += (e * y);
      } else {
        ans += (y * b);
      }
    }
  } else {
    ans += (x * a);
    ans += (y * b);
  }
  cout << ans << endl;
  return 0;
}
