#include <bits/stdc++.h>
using namespace std;
int main() {
  double x, y;
  int a, b, c, d = 0, e = 0;
  cin >> a >> b >> c >> x >> y;
  d = min(x, y);
  if (a + b > 2 * c) {
    for (int i = 0; i < d; i++) {
      e += c * 2;
      std::cout << e << std::endl;
    }
    std::cout << y << std::endl;
    for (int i = 0; i <= y; i++) {
      e += a;
    }
  } else {
    for (int i = 0; i < x; i++) {
      e += a;
    }
    for (int i = 0; i < y; i++) {
      e += b;
    }
  }
  std::cout << e << std::endl;
  return 0;
}
