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