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