#include <bits/stdc++.h>
int main(void) {
  int a, b, ab, x, y;
  scanf("%d%d%d%d%d", &a, &b, &ab, &x, &y);
  if (a / 2 + b / 2 <= ab) {
    printf("%d\n", a * x + b * y);
    return 0;
  }
  int buy_half = x < y ? x : y;
  int left_x = x - buy_half;
  int left_y = y - buy_half;
  if (left_x) {
    if (ab * 2 < a) {
      printf("%d\n", ab * (buy_half + left_x) * 2);
    } else {
      printf("%d\n", ab * buy_half * 2 + a * left_x);
    }
  }
  if (left_y) {
    if (ab * 2 < b) {
      printf("%d\n", ab * (buy_half + left_y) * 2);
    } else {
      printf("%d\n", ab * buy_half * 2 + b * left_y);
    }
  }
  return 0;
}
