#include <bits/stdc++.h>
using namespace std;

int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  
  int a = A * X + B * Y;
  int b = C * max(x, y);
  int c;
  if (X > Y) {
    c = C * Y + A * (X - Y);
  } else {
    c = C * X + B * (Y - X);
  }
  int ans = min(a, b);
  ans = min(ans, c);
  
  cout << ans << endl;
  
  
}