#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, ab, x, y;
  cin >> a >> b >> ab >> x >> y;
  if (a == b == ab) {
    if (x > y) {
      long long lish = x - y;
      x -= lish;
      x += y;
      cout << ab * x + lish * x << "\n";
    } else if (x < y) {
      long long lish = y - x;
      y -= lish;
      y += x;
      cout << ab * y + lish * y << "\n";
    } else {
      cout << ab * x + ab * y + ab * x + ab * y << "\n";
    }
  }
  if (x > y) {
    long long res3 = ab * x * 2;
    long long res1 = b * y + a * x;
    long long lish = x - y;
    x -= lish;
    x += y;
    long long res2 = ab * x + lish * a;
    cout << min(min(res1, res2), res3);
  } else if (y > x) {
    long long res3 = ab * y * 2;
    long long res1 = b * y + a * x;
    long long lish = y - x;
    y -= lish;
    y += x;
    long long res2 = ab * y + lish * b;
    cout << min(min(res1, res2), res3);
  } else {
    long long res1 = b * y + a * x;
    long long res2 = ab * y + ab * x + ab * y + ab * x;
    cout << min(res1, res2);
  }
  return 0;
}
