#include <bits/stdc++.h>
int main() {
  int a, b, ab, x, y, ans;
  scanf("%d%d%d%d%d", &a, &b, &ab, &x, &y);
  if (x < y) {
    int tmp = x;
    x = y;
    y = tmp;
    tmp = a;
    a = b;
    b = a;
  }
  if (a > ab * 2)
    ans = ab * x * 2;
  else if (a + b > ab * 2)
    ans = a * (x - y) + ab * y * 2;
  else
    ans = a * x + b * y;
  printf("%d", ans);
  return 0;
}
