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