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