#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  scanf("%d%d%d%d%d", &a, &b, &c, &x, &y);
  if (x < y) {
    int z = y;
    y = x;
    x = z;
  }
  int cntx = 0, cnty = 0, ans = 0;
  while (cnty != y) {
    if (a + b >= c * 2) {
      ans += (c * 2);
      cnty++;
    } else {
      ans += (a + b);
      cnty++;
    }
    cntx++;
  }
  while (cntx != x) {
    if (a >= c * 2) {
      ans += c * 2;
      cntx++;
    } else {
      ans += a;
      cntx++;
    }
  }
  printf("%d", ans);
}
