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