Codeforces Round 421 (Div. 2)
A
Mister B and Book Reading
Codeforces
900
原题
←B →
翻译中…

Mister B once received a gift: it was a book about aliens, which he started read immediately. This book had $*c*$ pages.

翻译中…

At first day Mister B read $*v*_{0}$ pages, but after that he started to speed up. Every day, starting from the second, he read $*a*$ pages more than on the previous day (at first day he read $*v*_{0}$ pages, at second — $*v*_{0} + *a*$ pages, at third — $*v*_{0} + 2*a*$ pages, and so on). But Mister B is just a human, so he physically wasn't able to read more than $*v*_{1}$ pages per day.

翻译中…

Also, to refresh his memory, every day, starting from the second, Mister B had to reread last $*l*$ pages he read on the previous day. Mister B finished the book when he read the last page for the first time.

翻译中…

Help Mister B to calculate how many days he needed to finish the book.

翻译中…

Input

翻译中…

First and only line contains five space-separated integers: $*c*$, $*v*_{0}$, $*v*_{1}$, $*a*$ and $*l*$ ($1 ≤ *c* ≤ 1000$, $0 ≤ *l* < *v*_{0} ≤ *v*_{1} ≤ 1000$, $0 ≤ *a* ≤ 1000$) — the length of the book in pages, the initial reading speed, the maximum reading speed, the acceleration in reading speed and the number of pages for rereading.

翻译中…

Output

翻译中…

Print one integer — the number of days Mister B needed to finish the book.

翻译中…

Note

翻译中…

In the first sample test the book contains $5$ pages, so Mister B read it right at the first day.

翻译中…

In the second sample test at first day Mister B read pages number $1 - 4$, at second day — $4 - 11$, at third day — $11 - 12$ and finished the book.

翻译中…

In third sample test every day Mister B read $1$ page of the book, so he finished in 15 days.

翻译中…

样例

Input #1
5 5 10 5 4
Output #1
1
InputCopy OutputCopy
Input #2
12 4 12 4 1
Output #2
3
InputCopy OutputCopy
Input #3
15 1 100 0 0
Output #3
15
InputCopy OutputCopy
题目信息
题号
820A
时间限制
2 s
内存限制
256 MB
标签
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。