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