#include <bits/stdc++.h>
using namespace std;
struct p {
  int h;
  int w;
  int n;
  bool flag = false;
};
int main() {
  ios::sync_with_stdio(false);
  int a, b, c, x, y;
  scanf("%d%d%d", &a, &b, &c);
  scanf("%d%d", &x, &y);
  int commont_part = (x < y ? x : y);
  int sum = 0;
  if (a + b > 2 * c)
    sum += 2 * c * commont_part;
  else
    sum += commont_part * (a + b);
  if ((x - commont_part) * a + (y - commont_part) * b <
      2 * c * (x - commont_part + y - commont_part)) {
    sum += (x - commont_part) * a + (y - commont_part) * b;
  } else {
    sum += 2 * c * (x - commont_part + y - commont_part);
  }
  printf("%d\n", sum);
  return 0;
}
