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