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