Checkout at an airport consists of two sequential events first passport check which takes time \(A\) minutes and there are \(B\) counters present for it. Second is luggage check which takes \(C\) minutes and there are \(D\) counters present for it.
Functioning of different counters is independent of each other and every passengers must go through both events in order i.e. first passport then luggage check.
Given \(N\) passengers and their arrival time \(A[i]\). Find the minimum time in which all the passengers will get their both events done.
Input format
Output format
Print a single integer denoting the minimum time required to get all passengers done with both events.
Constraints
\(1 \le A, C \le 10^9 \\ 1 \le N, B , D \le 10^5 \\ 1 \le A[i] \le 10^9 \\ A[i-1] \leq A[i]\)