#include <bits/stdc++.h>
int main(void) {
  int X, Y;
  int A, B, C;
  int money = 0;
  scanf("%d", &A);
  scanf("%d", &B);
  scanf("%d", &C);
  scanf("%d", &X);
  scanf("%d", &Y);
  if (2 * C <= A + B) {
    while ((X <= 0) | (Y <= 0)) {
      money = money + 2 * C;
      X--;
      Y--;
    }
    if (A >= 2 * C) {
      while (X >= 0) {
        money = money + 2 * C;
        X--;
        Y--;
      }
    }
    if (B >= 2 * C) {
      while (Y >= 0) {
        money = money + 2 * C;
        X--;
        Y--;
      }
    }
    if (X <= 0) {
      X = 0;
    }
    if (Y <= 0) {
      Y = 0;
    }
    printf("%d", money + X * A + Y * B);
    return 0;
  }
  if (2 * C >= A + B) {
    printf("%d", A * X + B * Y);
    return 0;
  }
  return 0;
}
