#include <bits/stdc++.h>
int max(int a, int b) {
  if (a >= b)
    return a;
  else
    return b;
}
int min(int a, int b) {
  if (a <= b)
    return a;
  else
    return b;
}
int main() {
  int a, b, c, x, y;
  int cost = 0;
  scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
  int ave = a + b;
  if (ave <= c) {
    cost += a * x;
    cost += b * y;
    printf("%d\n", cost);
  } else {
    if (c < a && c < b) {
      cost += c * max(x, y) * 2;
      printf("%d\n", cost);
    } else {
      int data = min(x, y);
      cost += c * data * 2;
      x -= data;
      y -= data;
      cost += a * x;
      cost += b * y;
      printf("%d\n", cost);
    }
  }
}
