#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int c2 = 2 * c;
  int best = min(a + b, c2);
  int mi = min(x, y);
  int ma = max(x, y);
  int zan = ma - mi;
  int sum = 0;
  if (best == c2) {
    sum += best * mi;
    if (x > y) {
      if (c2 < a) {
        sum += c2 * zan;
      } else if (c2 >= a) {
        sum += a * zan;
      }
    }
    if (x < y) {
      if (c2 < b) {
        sum += c2 * zan;
      }
      if (c2 >= b) {
        sum += b * zan;
      }
    }
  }
  if (best == a + b) {
    sum += best * mi;
    if (x > y) {
      sum += a * zan;
    }
    if (x < y) {
      sum += b * zan;
    }
  }
  cout << sum << endl;
}
