#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e9 + 7;
int main() {
  long long a, b, c, x, y, Min, ab, ans;
  cin >> a >> b >> c >> x >> y;
  if ((a + b) >= 2 * c) {
    if (x > y)
      Min = y;
    else
      Min = x;
    ans = Min * c * 2;
    if (2 * c < a || 2 * c < b) {
      int t = x - y;
      if (t < 0) t = -t;
      ans += t * 2 * c;
    } else {
      if (Min == x) {
        ans += (y - x) * b;
      } else
        ans += (x - y) * a;
    }
  } else {
    ans = x * a + y * b;
  }
  cout << ans << endl;
  return 0;
}
