#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  int A, B;
  scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
  if (x == y)
    printf("%d", x * c * 2);
  else {
    A = a * x + b * y;
    B = min(x, y) * c * 2;
    x -= min(x, y);
    y -= min(x, y);
    if (max(x, y) == x)
      B += x * a;
    else
      B += y * b;
    printf("%d", A > B ? B : A);
  }
  return 0;
}
