#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 0;
  if (c <= a && c <= b) {
    ans = max(x, y) * c * 2;
  } else if (a <= c && b <= c) {
    ans += x * a + y * b;
  } else {
    if (b < a) {
      swap(a, b);
      swap(x, y);
    }
    if (x > y) {
      ans += (x - y) * a;
      int min = 5000 * 1e5;
      for (int i = 0; i <= y; ++i) {
        int price = i * ((a + b) / 2) + (y - i) * c;
        min = min > price ? price : min;
      }
      ans += 2 * min;
    } else {
      ans += (y - x) * b;
      int min = 5000 * 1e5;
      for (int i = 0; i <= x; ++i) {
        int price = i * ((a + b) / 2) + (x - i) * c;
        min = min > price ? price : min;
      }
      ans += 2 * min;
    }
  }
  cout << ans << endl;
  return 0;
}
