#BS0000064. Nhiệm vụ rất dễ (Very Easy Task)

Nhiệm vụ rất dễ (Very Easy Task)

Very Easy Task

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

There is initially one original sheet and nn additional copies are required. Copier 1 needs xx seconds per copy and copier 2 needs yy seconds. A copier needs an existing sheet as source; after the first copy exists, both copiers may work simultaneously. Find the minimum time to produce nn copies.

Input

The only line contains n,x,yn,x,y.

Output

Print the minimum number of seconds.

Subtasks

  • Subtask 1 — 20%: n≤104n\le10^4.
  • Subtask 2 — 30%: n≤107n\le10^7.
  • Subtask 3 — 50%: n≤2⋅108n\le2\cdot10^8, 1≤x,y≤101\le x,y\le10.

Example

Input

4 1 1

Output

3

Explanation

The first copy takes one second, after which both copiers can work in parallel.