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 + 2a 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.


-----Examples-----
Input
5 5 10 5 4

Output
1

Input
12 4 12 4 1

Output
3

Input
15 1 100 0 0

Output
15



-----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.

Difficulty: EASY
Tags: Implementation

Starter code:

Solutions:
(c, v, vm, a, l) = list(map(int, input().split()))
pos = v
time = 1
add = v
while pos < c:
	add = min(vm, add + a)
	pos += add - l
	time += 1
print(time)


I = lambda : list(map(int, input().split()))
(c, v0, v1, a, l) = I()
rd = 0
day = 0
while rd < c:
	canread = min(v0 + day * a, v1)
	start = max(rd - l, 0)
	rd = start + canread
	day += 1
print(day)


(c, v0, v1, a, l) = map(int, input().split())
curr_pages = v0
days = 0
while c > 0:
	c -= curr_pages
	days += 1
	curr_pages += a
	curr_pages = min(curr_pages, v1)
	if c > 0:
		c += l
print(days)


(c, v0, v1, a, l) = map(int, input().split(' '))

def an(a1, d, n, c):
	x = a1 + d * (n - 1)
	if x >= c:
		return c
	return x
cnt = 0
d = 1
b = 0
while cnt < c:
	x = an(v0, a, d, v1)
	if d > 1:
		cnt += x - l
	else:
		cnt += x
	d += 1
print(d - 1)


(c, v0, v1, a, l) = map(int, input().split())
day = sum = 0
while True:
	rst = v0 + a * day
	if rst > v1:
		sum += v1
	else:
		sum += rst
	day += 1
	if sum >= c:
		print(day)
		exit()
	sum -= l


(c, v0, v1, a, l) = map(int, input().split())
cur = d = 0
while cur < c:
	if d > 0:
		cur -= l
		cur = max(cur, 0)
	d += 1
	cur += min(v0, v1)
	v0 += a
print(d)


(c, v0, v1, a, l) = map(int, input().split())
day = 1
left = c
while left > 0:
	left -= v0
	if day > 1:
		left += min(c - left, l)
	v0 += a
	v0 = min(v0, v1)
	if left <= 0:
		break
	day += 1
print(day)


(c, v0, v1, a, l) = [int(x) for x in input().split()]
s = v0
c = c - s
j = 1
while c > 0:
	if s + a < v1:
		s = s + a
	else:
		s = v1
	c = c - s + l
	j += 1
print(j)


inp = input().split()
c = int(inp[0])
v0 = int(inp[1])
v1 = int(inp[2])
a = int(inp[3])
l = int(inp[4])
total = c
val = v0
day = 0
while True:
	if val > v1:
		val = v1
	total -= val
	if day != 0:
		total += l
	if total <= 0:
		break
	val += a
	day += 1
print(day + 1)


(c, v0, v1, a, l) = map(int, input().split())
(cnt, i) = (v0, 0)
while c > 0:
	c += l if i else 0
	c -= cnt
	cnt += a
	cnt = v1 if v1 < cnt else cnt
	i += 1
print(i)


(c, v1, v2, a, l) = map(int, input().split())
cnt = 0
r = v1
while c > 0:
	cnt += 1
	c -= r
	r = min(v2, r + a)
	if c <= 0:
		break
	c += l
print(cnt)


(c, u, v, a, l) = map(int, input().split())
m = 1
c -= u
while c > 0:
	m += 1
	u = min(v, u + a)
	c -= u - l
print(m)


(c, v0, v1, a, l) = map(int, input().split())
x = 0
i = 0
while x < c:
	x += min(v0 + a * i, v1) - l * (i > 0)
	i += 1
print(i)


(c, v, v1, a, l) = map(int, input().split())
i = 1
c -= v
v -= l
v1 -= l
while c > 0:
	i += 1
	v = min(v1, v + a)
	c -= v
print(i)


(n, v0, v1, d, l) = (int(x) for x in input().split())
days = 1
while True:
	v = v0 - (0 if days == 1 else l)
	if v >= n:
		print(days)
		break
	n -= v
	v0 = min(v0 + d, v1)
	days += 1


(c, v0, v1, a, l) = map(int, input().split())
r = v0
br = 1
while r < c:
	r -= l
	r += min(v0 + br * a, v1)
	br += 1
print(br)


(c, v0, v1, a, l) = list(map(int, input().split()))
if c <= v0:
	print(1)
	exit(0)
lastv = v0
day = 1
s = v0
while True:
	day += 1
	lastv = lastv + a
	if lastv > v1:
		lastv = v1
	s = s - l + lastv
	if s >= c:
		break
print(day)


(c, v0, v1, a, l) = list(map(int, input().split()))
v = v0
read = v
day = 1
v += a
v = min(v, v1)
if read >= c:
	print(day)
	return
while True:
	day += 1
	read += v - l
	v += a
	v = min(v, v1)
	if read >= c:
		print(day)
		return


(c, v0, v1, a, l) = map(int, input().split())
v = v0
read = v
day = 1
v += a
v = min(v, v1)
if read >= c:
	print(day)
	exit(0)
while True:
	day += 1
	read += v - l
	v += a
	v = min(v, v1)
	if read >= c:
		print(day)
		exit(0)


(c, v0, v1, a, l) = map(int, input().split())
days = 1
pages = v0
dp = v0
while pages < c:
	if dp + a <= v1:
		dp += a
	else:
		dp = v1
	pages += dp - l
	days += 1
print(days)


def solve():
	(c, v0, v1, a, l) = get([int])
	page = 0
	days = 0
	while page < c:
		page += v0 - (0 if page == 0 else l)
		v0 += a
		if v0 > v1:
			v0 = v1
		days += 1
	return days
_testcases = '\n5 5 10 5 4\n\n1\n\n12 4 12 4 1\n\n3\n\n15 1 100 0 0\n\n15\n\n'.strip()
import re
import sys
import math
import heapq
from heapq import heapify, heappop, heappush
import bisect
import string
from bisect import bisect_left, bisect_right
import operator
from operator import itemgetter, attrgetter
import itertools
import collections
inf = float('inf')
sys.setrecursionlimit(10000)

def tree():
	return collections.defaultdict(tree)

def cache(func):
	cache_dict = {}

	def _cached_func(*args, _get_cache=False):
		if _get_cache:
			return cache_dict
		if args in cache_dict:
			return cache_dict[args]
		cache_dict[args] = func(*args)
		return cache_dict[args]
	return _cached_func

def equal(x, y, epsilon=1e-06):
	if -epsilon <= x - y <= epsilon:
		return True
	if -epsilon <= x <= epsilon or -epsilon <= y <= epsilon:
		return False
	return -epsilon <= (x - y) / x <= epsilon or -epsilon <= (x - y) / y <= epsilon

def get(_type):
	if type(_type) == list:
		if len(_type) == 1:
			_type = _type[0]
			return list(map(_type, input().strip().split()))
		else:
			return [_type[i](inp) for (i, inp) in enumerate(input().strip().split())]
	else:
		return _type(input().strip())
print(solve())


line = input()
nrs = list(map(int, line.split(' ')))
c = nrs[0]
v0 = nrs[1]
v1 = nrs[2]
a = nrs[3]
l = nrs[4]
pages_read = v0
days = 1
pages = v0
while pages_read < nrs[0]:
	pages += a
	if pages > v1:
		pages = v1
	pages_read -= l
	pages_read += pages
	days += 1
print(days)


(a, b, c, d, e) = map(int, input().split())
a = a - b
k = 1
r = 1
while a > 0:
	k = k + 1
	a = a - min(b + d * r, c) + e
	r = r + 1
print(k)


(c, v0, v1, a, l) = list(map(int, input().split()))
p = 0
d = 0
while True:
	p += min(v1, v0 + a * d)
	d += 1
	if p >= c:
		print(d)
		break
	p -= l


(c, vo, v1, a, l) = map(int, input().split())
t = 0
speed = vo
days = 0
while True:
	c = c - speed
	days = days + 1
	if c <= 0:
		break
	c = c + l
	speed = speed + a
	speed = min(speed, v1)
print(days)


(c, v0, v1, a, l) = map(int, input().split())
day = 1
read = v0
while read < c:
	read -= l
	day += 1
	v0 = v0 + a if v0 + a <= v1 else v1
	read += v0
print(day)


def solve(inp):
	(c, v0, v1, a, l) = list(map(int, inp.split(' ', 4)))
	pages_read = 0
	days_passed = 0
	while pages_read < c:
		pages_read += v0 - min(l, pages_read)
		days_passed += 1
		v0 = min(v0 + a, v1)
	return days_passed

def __starting_point():
	print(solve(input()))
__starting_point()


(c, v0, v1, a, l) = list(map(int, input().split()))
days = 1
new = v0
read = v0
while 1:
	if new >= c:
		break
	read = min(read + a, v1)
	new += read - l
	days += 1
print(days)


numList = input().split(' ')
c = int(numList[0])
v0 = int(numList[1])
v1 = int(numList[2])
a = int(numList[3])
l = int(numList[4])
iPage = 0
iDay = 0
while iPage < c:
	iDay += 1
	iAddPage = v0 + (iDay - 1) * a
	if iAddPage > v1:
		iAddPage = v1
	if iDay == 1:
		iPage += iAddPage
	else:
		iPage += iAddPage - l
print(iDay)


(pages, speed, max_speed, acc, review) = tuple(map(int, input().split()))
read = 0
count = 0
while read < pages:
	count += 1
	to_read = speed
	if count > 1:
		to_read -= review
	read += to_read
	speed += acc
	if speed > max_speed:
		speed = max_speed
print(count)


(number_of_pages, v0, max_number_of_pages, a, l) = list(map(int, input().split()))
prev = 0
days = 0
read = v0
while number_of_pages > 0:
	days += 1
	today = read - min(l, prev)
	number_of_pages -= today
	prev = read
	read = min(max_number_of_pages, read + a)
print(days)


class Solution:

	@staticmethod
	def bookreading(pages, firstday, threshold, addingFactor, gobackPages):
		pages_read = firstday
		pages = pages - pages_read
		day = 1
		while pages > 0:
			pages = pages + gobackPages
			factor = firstday + day * addingFactor
			if factor <= threshold:
				pages_read = factor
			else:
				pages_read = threshold
			pages = pages - pages_read
			day += 1
		return day
(c, v0, v1, a, l) = map(int, input().split())
days = Solution.bookreading(c, v0, v1, a, l)
print(days)


(c, v_0, v_1, a, l) = map(int, input().split())
days = 0
multiplier = 1
while c > 0:
	if days == 0:
		c -= v_0
	else:
		c += l
		c -= min(v_1, v_0 + multiplier * a)
		multiplier += 1
	days += 1
print(days)


(total_pages_nr, min_pages_per_day, max_pages_per_day, delta, reread_pages_nr) = (int(x) for x in input().split())
days_nr = 0
pages_read_nr = 0
curr_speed = min_pages_per_day
flag = False
while pages_read_nr < total_pages_nr:
	if flag:
		pages_read_nr -= reread_pages_nr
	flag = True
	pages_read_nr = max(curr_speed, pages_read_nr + curr_speed)
	curr_speed += delta
	if curr_speed > max_pages_per_day:
		curr_speed = max_pages_per_day
	days_nr += 1
print(days_nr)


(c, v0, v1, a, l) = [int(i) for i in input().split()]
ans = 1
cur = v0
while v0 < c:
	ans += 1
	cur += a
	v0 += min(v1, cur) - l
print(ans)


(c, v0, v1, a, l) = input().split()
c = int(c)
v0 = int(v0)
v1 = int(v1)
a = int(a)
l = int(l)
d = 0
s = 0
while s < c:
	d += 1
	if s != 0:
		s -= l
	s += min(v1, v0 + (d - 1) * a)
print(d)


(c, vo, vi, a, l) = map(int, input().split())
day = 1
c -= vo
while c > 0:
	day += 1
	vo = min(vo + a, vi)
	c -= vo - l
print(day)


(c, v0, v1, a, l) = map(int, input().split())
k = 1
c -= v0
while c > 0:
	k += 1
	c += l
	c -= min(v0 + a * (k - 1), v1)
print(k)


(c, v0, v1, a, l) = map(int, input().split())
(now, day) = (0, 0)
while now < c:
	if day == 0:
		now += v0
	else:
		now += v0 - l
	if v0 + a < v1:
		v0 += a
	else:
		v0 = v1
	day += 1
print(day)


(c, v0, v1, a, l) = list(map(int, input().split()))
ans = 0
v = v0
p = 0
while p < c:
	p = max(p - l, 0)
	p += v
	v = min(v + a, v1)
	ans += 1
print(ans)


(c, n, m, a, l) = map(int, input().split())
read = n
i = 1
while read < c:
	read += min(n + i * a, m) - l
	i += 1
print(i)


Input = lambda : map(int, input().split())
x = 0
List = list(Input())
Read = 0
Day = 0
while True:
	Read += min(List[1] + x * List[3], List[2])
	if Read >= List[0]:
		Day += 1
		break
	x += 1
	List[0] += List[4]
	Day += 1
print(Day)


from sys import maxsize, stdout, stdin, stderr
mod = int(1000000000.0 + 7)
import re
tup = lambda : map(int, stdin.readline().split())
I = lambda : int(stdin.readline())
lint = lambda : [int(x) for x in stdin.readline().split()]
S = lambda : stdin.readline().replace('\n', '').strip()

def grid(r, c):
	return [lint() for i in range(r)]

def debug(*args, c=6):
	print('\x1b[3{}m'.format(c), *args, '\x1b[0m', file=stderr)
from math import log2, sqrt
from collections import defaultdict
(c, v0, v1, a, l) = tup()
(cnt, x, p) = (1, v0, 0)
c -= v0
while c > 0:
	cnt += 1
	v0 = min(v1, v0 + a)
	c -= v0 - l
print(cnt)


(c, v0, v1, a, l) = [int(item) for item in input().split()]
p = v0
ans = 1
v = v0
while p < c:
	v += a
	read = min(v, v1)
	p += read - l
	ans += 1
print(ans)


import sys
from sys import stdin, stdout
import bisect
from itertools import groupby
import math
import heapq

def modinv(n, p):
	return pow(n, p - 2, p)

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())
import math

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def most_frequent(list):
	return max(set(list), key=list.count)

def main():
	n = ain()
	c = n[0]
	v0 = n[1]
	v1 = n[2]
	a = n[3]
	l = n[4]
	res = c
	count = 1
	for i in range(c):
		res = res - v0
		if res <= 0:
			print(count)
			break
		elif count == 1 and res <= 0:
			print(count)
			break
		else:
			if count != 0:
				v0 = min(v0 + a, v1)
				res = res + l
				if res <= 0:
					print(count)
					break
			count = count + 1
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import sys

class ostream:

	def __lshift__(self, a):
		sys.stdout.write(str(a))
		return self
cout = ostream()
endl = '\n'

def readnumbers(zero=0):
	conv = ord if py2 else lambda x: x
	A = []
	numb = zero
	sign = 1
	i = 0
	s = sys.stdin.buffer.read()
	try:
		while True:
			if s[i] >= b'0'[0]:
				numb = 10 * numb + conv(s[i]) - 48
			elif s[i] == b'-'[0]:
				sign = -1
			elif s[i] != b'\r'[0]:
				A.append(sign * numb)
				numb = zero
				sign = 1
			i += 1
	except:
		pass
	if s and s[-1] >= b'0'[0]:
		A.append(sign * numb)
	return A
main()


(tp, v0, vi, a, rerd) = map(int, input().strip().split()[:5])
(z, x, count) = (0, 0, 0)
while z < tp:
	if x == 0:
		z += v0
		count += 1
	else:
		z += min(v0 + a * x, vi) - rerd
		count += 1
	x += 1
print(count)


(c, v0, v1, a, l) = map(int, input().split())
c -= v0
s = 1
while c > 0:
	if v0 + a < v1:
		v0 += a
	else:
		v0 = v1
	c -= v0 - l
	s += 1
print(s)


(c, v0, v1, a, l) = map(int, input().split())
ans = 0
while True:
	ans = ans + 1
	c = c - v0
	if c <= 0:
		break
	c = c + l
	v0 = min(v0 + a, v1)
print(ans)


temp = [int(x) for x in input().split()]
count = 0
i = 0
while True:
	if i == 0:
		count += temp[1]
		if count >= temp[0]:
			break
	else:
		count -= temp[4]
		if temp[1] + i * temp[3] < temp[2]:
			count += temp[1] + i * temp[3]
		else:
			count += temp[2]
		if count >= temp[0]:
			break
	i += 1
print(i + 1)


(c, v0, v1, a, l) = [int(x) for x in input().split()]
y = x = v0
z = 1
if v0 >= c:
	print(1)
else:
	while x < c:
		z = z + 1
		y = y + a
		if y > v1:
			y = v1
		x = x - l + y
	print(z)


(c, v0, v1, a, l) = list(map(int, input().split()))
current = 0
days = 0
c = c - v0
days += 1
current = v0
while c > 0:
	c += l
	current += a
	if current > v1:
		current = v1
	c -= current
	days += 1
print(days)


(c, v, max, a, l) = map(int, input().split())
i = 1
days = 1
page = v
while page < c:
	if v + i * a <= max:
		page = page - l + v + i * a
	else:
		page = page - l + max
	days += 1
	i += 1
print(days)


(book, v, maxv, a, reread) = input().split()
book = int(book)
v = int(v)
maxv = int(maxv)
a = int(a)
reread = int(reread)
last = int(v)
days = 1
while last < book:
	v = v + a
	if v > maxv:
		v = maxv
	last -= reread
	last += v
	days += 1
print(days)


(c, v0, v1, a, l) = map(int, input().split())
t = v0
cv = v0
d = 1
while t < c:
	cv += a
	if cv > v1:
		cv = v1
	t += cv - l
	d += 1
print(d)


def solve(c, v0, v1, a, l):
	count = 0
	c -= v0
	count += 1
	if c <= 0:
		return count
	d = 1
	c += l
	while True:
		val = d * a + v0
		if val > v1:
			val = v1
		c -= val
		count += 1
		d += 1
		if c <= 0:
			return count
		c += l

def main():
	arr = list(map(int, input().split(' ')))
	print(solve(*arr))
main()


listy = input().split()
listy = [int(x) for x in listy]
c = listy[0]
v0 = listy[1]
v1 = listy[2]
a = listy[3]
l = listy[4]
left = c - v0
if left == 0:
	print(1)
else:
	xxx = 1
	while left > 0:
		speed = v0 + xxx * a
		if speed > v1:
			speed = v1
		left = left + l - speed
		xxx += 1
	print(xxx)


l1 = [int(x) for x in input().split()]
(c, v0, v1, a, l) = (l1[0], l1[1], l1[2], l1[3], l1[4])
i = 0
days = 0
while i < c:
	days += 1
	today = max(0, -l * int(days > 1) + min(v0 + a * (days - 1), v1))
	i += today
print(days)


(c, v0, v1, a, l) = map(int, input().strip().split())
read = v0
new = v0
days = 1
while c > read:
	new = min(v1, new + a)
	read += new - l
	days += 1
print(days)


import sys

def main():
	(c, v0, v1, a, l) = list(map(int, sys.stdin.readline().split()))
	day = 0
	v = v0
	read = 0
	while read < c:
		day += 1
		read = max(read - l, 0) + v
		v = min(v + a, v1)
	print(day)

def __starting_point():
	main()
__starting_point()


def book_reading():
	time = list(map(int, input().split()))
	if time[0] <= time[1]:
		return 1
	elif time[0] == 1:
		return 1
	output = time[1]
	counter = 1
	mult = 1
	while True:
		output -= time[4]
		add = time[1] + time[3] * mult
		if add > time[2]:
			output += time[2]
		else:
			output += add
		counter += 1
		mult += 1
		if output >= time[0]:
			return counter
A = book_reading()
print(A)


import math

def f(a, b, c, d, e):
	if a == 0:
		return 0
	elif b >= a:
		return 1
	elif b == c:
		return math.ceil((a - c) / (c - e) + 1)
	elif d == 0:
		return math.ceil((a - b) / (b - e) + 1)
	elif b + d > c:
		return 1 + f(a - b + e, c, c, d, e)
	else:
		return 1 + f(a - b + e, b + d, c, d, e)
m = [int(j) for j in input().split()]
print(f(m[0], m[1], m[2], m[3], m[4]))


(c, v0, v1, a, l) = list(map(int, input().split()))
current = 0
read_speed = v0
first = True
while c > 0:
	c -= read_speed - l * (not first)
	first = False
	read_speed += a
	read_speed = min(v1, read_speed)
	current += 1
print(current)


(c, v0, v1, a, l) = map(int, input().split())
ans = 0
while c > 0:
	if v0 > v1:
		v0 = v1
	c -= v0
	ans += 1
	v0 += a
	if c > 0:
		c += l
print(ans)


lst = input().split()
for i in range(len(lst)):
	lst[i] = int(lst[i])
c = lst[0]
v0 = lst[1]
v1 = lst[2]
a = lst[3]
l = lst[4]
pos = 0
buf = v0
ans = 0
while pos < c:
	if pos != 0:
		pos -= l
	pos += buf
	ans += 1
	buf += a
	if buf > v1:
		buf = v1
print(ans)


s_1 = input()
l_1 = s_1.split()
c = int(l_1[0])
v = int(l_1[1])
v1 = int(l_1[2])
a = int(l_1[3])
l = int(l_1[4])
x = v
i = 1
while x < c:
	if v + a < v1:
		v += a
	else:
		v = v1
	x = x + v - l
	i += 1
print(i)


import os
import sys
import math
from io import BytesIO, IOBase
import io
from fractions import Fraction
import collections
from itertools import permutations
from collections import defaultdict
from collections import deque
from collections import Counter
import threading
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: math.gcd(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree1:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)
MOD = 10 ** 9 + 7

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD
mod = 10 ** 9 + 7
omod = 998244353
prime = [True for i in range(11)]
prime[0] = prime[1] = False

def SieveOfEratosthenes(n=10):
	p = 2
	c = 0
	while p <= n:
		if prime[p] == True:
			c += 1
			for i in range(p, n + 1, p):
				prime[i] = False
		p += 1

class DSU:

	def __init__(self, R, C):
		self.par = range(R * C + 1)
		self.rnk = [0] * (R * C + 1)
		self.sz = [1] * (R * C + 1)

	def find(self, x):
		if self.par[x] != x:
			self.par[x] = self.find(self.par[x])
		return self.par[x]

	def union(self, x, y):
		(xr, yr) = (self.find(x), self.find(y))
		if xr == yr:
			return
		if self.rnk[xr] < self.rnk[yr]:
			(xr, yr) = (yr, xr)
		if self.rnk[xr] == self.rnk[yr]:
			self.rnk[xr] += 1
		self.par[yr] = xr
		self.sz[xr] += self.sz[yr]

	def size(self, x):
		return self.sz[self.find(x)]

	def top(self):
		return self.size(len(self.sz) - 1) - 1

class LazySegTree:

	def __init__(self, _op, _e, _mapping, _composition, _id, v):

		def set(p, x):
			assert 0 <= p < _n
			p += _size
			for i in range(_log, 0, -1):
				_push(p >> i)
			_d[p] = x
			for i in range(1, _log + 1):
				_update(p >> i)

		def get(p):
			assert 0 <= p < _n
			p += _size
			for i in range(_log, 0, -1):
				_push(p >> i)
			return _d[p]

		def prod(l, r):
			assert 0 <= l <= r <= _n
			if l == r:
				return _e
			l += _size
			r += _size
			for i in range(_log, 0, -1):
				if l >> i << i != l:
					_push(l >> i)
				if r >> i << i != r:
					_push(r >> i)
			sml = _e
			smr = _e
			while l < r:
				if l & 1:
					sml = _op(sml, _d[l])
					l += 1
				if r & 1:
					r -= 1
					smr = _op(_d[r], smr)
				l >>= 1
				r >>= 1
			return _op(sml, smr)

		def apply(l, r, f):
			assert 0 <= l <= r <= _n
			if l == r:
				return
			l += _size
			r += _size
			for i in range(_log, 0, -1):
				if l >> i << i != l:
					_push(l >> i)
				if r >> i << i != r:
					_push(r - 1 >> i)
			l2 = l
			r2 = r
			while l < r:
				if l & 1:
					_all_apply(l, f)
					l += 1
				if r & 1:
					r -= 1
					_all_apply(r, f)
				l >>= 1
				r >>= 1
			l = l2
			r = r2
			for i in range(1, _log + 1):
				if l >> i << i != l:
					_update(l >> i)
				if r >> i << i != r:
					_update(r - 1 >> i)

		def _update(k):
			_d[k] = _op(_d[2 * k], _d[2 * k + 1])

		def _all_apply(k, f):
			_d[k] = _mapping(f, _d[k])
			if k < _size:
				_lz[k] = _composition(f, _lz[k])

		def _push(k):
			_all_apply(2 * k, _lz[k])
			_all_apply(2 * k + 1, _lz[k])
			_lz[k] = _id
		_n = len(v)
		_log = _n.bit_length()
		_size = 1 << _log
		_d = [_e] * (2 * _size)
		_lz = [_id] * _size
		for i in range(_n):
			_d[_size + i] = v[i]
		for i in range(_size - 1, 0, -1):
			_update(i)
		self.set = set
		self.get = get
		self.prod = prod
		self.apply = apply
MIL = 1 << 20

def makeNode(total, count):
	return total * MIL + count

def getTotal(node):
	return math.floor(node / MIL)

def getCount(node):
	return node - getTotal(node) * MIL
nodeIdentity = makeNode(0.0, 0.0)

def nodeOp(node1, node2):
	return node1 + node2
	return makeNode(getTotal(node1) + getTotal(node2), getCount(node1) + getCount(node2))
identityMapping = -1

def mapping(tag, node):
	if tag == identityMapping:
		return node
	count = getCount(node)
	return makeNode(tag * count, count)

def composition(mapping1, mapping2):
	return mapping1 if mapping1 != identityMapping else mapping2

def memodict(f):

	class memodict(dict):

		def __missing__(self, key):
			ret = self[key] = f(key)
			return ret
	return memodict().__getitem__

def pollard_rho(n):
	if n & 1 == 0:
		return 2
	if n % 3 == 0:
		return 3
	s = (n - 1 & 1 - n).bit_length() - 1
	d = n >> s
	for a in [2, 325, 9375, 28178, 450775, 9780504, 1795265022]:
		p = pow(a, d, n)
		if p == 1 or p == n - 1 or a % n == 0:
			continue
		for _ in range(s):
			prev = p
			p = p * p % n
			if p == 1:
				return math.gcd(prev - 1, n)
			if p == n - 1:
				break
		else:
			for i in range(2, n):
				(x, y) = (i, (i * i + 1) % n)
				f = math.gcd(abs(x - y), n)
				while f == 1:
					(x, y) = ((x * x + 1) % n, (y * y + 1) % n)
					y = (y * y + 1) % n
					f = math.gcd(abs(x - y), n)
				if f != n:
					return f
	return n

@memodict
def prime_factors(n):
	if n <= 1:
		return Counter()
	f = pollard_rho(n)
	return Counter([n]) if f == n else prime_factors(f) + prime_factors(n // f)

def distinct_factors(n):
	factors = [1]
	for (p, exp) in prime_factors(n).items():
		factors += [p ** i * factor for factor in factors for i in range(1, exp + 1)]
	return factors

def all_factors(n):
	(small, large) = ([], [])
	for i in range(1, int(n ** 0.5) + 1, 2 if n & 1 else 1):
		if not n % i:
			small.append(i)
			large.append(n // i)
	if small[-1] == large[-1]:
		large.pop()
	large.reverse()
	small.extend(large)
	return small

def binarySearch(arr, n, key):
	left = 0
	right = n - 1
	mid = 0
	res = n
	while left <= right:
		mid = (right + left) // 2
		if arr[mid] > key:
			res = mid
			right = mid - 1
		else:
			left = mid + 1
	return res

def binarySearch1(arr, n, key):
	left = 0
	right = n - 1
	mid = 0
	res = -1
	while left <= right:
		mid = (right + left) // 2
		if arr[mid] > key:
			right = mid - 1
		else:
			res = mid
			left = mid + 1
	return res
t = 1
for _ in range(t):
	(c, v0, v1, a, l) = map(int, input().split())
	c -= v0
	if c <= 0:
		print(1)
		continue
	ct = 1
	curr = v0
	for i in range(10 ** 5):
		ct += 1
		curr = curr + a
		curr = min(curr, v1)
		c -= curr - l
		if c <= 0:
			break
	print(ct)


def process():
	(c, v0, v1, a, l) = map(int, input().split())
	page = v0
	day = 1
	while page < c:
		p = min(v1, v0 + a * day)
		page += p
		day += 1
		page -= l
		if page >= c:
			break
	print(day)
process()


(c, v0, v1, a, l) = map(int, input().split())
cnt = 0
ans = 0
v = v0
while cnt < c:
	cnt += v
	if ans != 0:
		cnt -= l
	if v + a < v1:
		v += a
	else:
		v = v1
	ans += 1
print(ans)


(c, v0, v1, a, l) = map(int, input().split())
s = v0
i = 1
while c > s:
	s += min(v0 + i * a, v1)
	i += 1
	s -= l
print(i)


(c, v0, v1, a, l) = list(map(int, input().split()))
v = v0
t = 1
last = v0
if last >= c:
	print(1)
	return
while last < c:
	v = min(v1, v0 + t * a) - l
	last += v
	t += 1
print(t)


(c, v0, v1, a, l) = map(int, input().split())
res = 1
q = v0
while True:
	if q >= c:
		break
	q -= l
	q += min(v0 + a * res, v1)
	res += 1
print(res)


def ok(c, v0, v1, a, l):
	days = 1
	c -= v0
	while c > 0:
		v0 += a
		v0 = min(v0, v1)
		read = max(0, v0 - l)
		c -= read
		days += 1
	return days
(c, v0, v1, a, l) = map(int, input().split())
print(ok(c, v0, v1, a, l))


(c, v0, v1, a, l) = map(int, input().split())
n = 0
while c > 0:
	c -= v0
	v0 = min(v0 + a, v1)
	if n > 0:
		c += l
	n += 1
print(n)


l = list(map(int, input().split()))
days = 0
total = l[0]
current_speed = l[1]
while total > 0:
	current_speed = l[1] + days * l[3]
	if current_speed > l[2]:
		current_speed = l[2]
	total -= current_speed
	days += 1
	if total <= 0:
		break
	else:
		total += l[4]
print(days)


(c, v0, v1, a, l) = list(map(int, input().split()))
aux = v0
i = 1
while c > aux:
	aux += min(v0 + i * a, v1)
	i += 1
	aux -= l
print(i)


(c, v0, v1, a, l) = (int(x) for x in input().split())
d = 1
c = c - v0
while c > 0:
	v = v0 + d * a
	if v > v1:
		v = v1
	v = v - l
	c = c - v
	d += 1
print(d)


(c, v0, v1, a, l) = map(int, input().split())
v = min(v1, v0 + a)
i = v0
answer = 1
while i < c:
	answer += 1
	i += v - l
	v = min(v1, v + a)
print(answer)


(c, v0, v1, a, l) = (int(i) for i in input().split())
day = 1
while c > 0:
	c -= v0
	if c <= 0:
		break
	v0 = min(v1, v0 + a)
	c += l
	day += 1
print(day)


3

def read_ints():
	return [int(i) for i in input().split()]
(c, v0, v1, a, l) = read_ints()
s = 0
d = 1
while s < c:
	s = min(s + v0, c)
	if s == c:
		break
	v0 = min(v0 + a, v1)
	s -= l
	d += 1
print(d)


(c, v0, v1, a, l) = map(int, input().split())
days = 0
read = 0
while True:
	read += v0
	days += 1
	if read < c:
		read -= l
		v0 = min(v1, v0 + a)
	else:
		break
print(days)


(c, v0, v1, a, l) = map(int, input().split())
total = 0
days = 0
while total < c:
	days += 1
	if days == 1:
		total += min(v0, v1)
	else:
		total += min(v1 - l, v0 + a * (days - 1) - l)
print(days)


def main():
	(c, v0, v1, a, l) = map(int, input().split())
	v0 -= l
	v1 -= l
	for t in range(1, 10000):
		c -= v0
		if c <= l:
			break
		v0 = min(v0 + a, v1)
	print(t)
main()


def list_input():
	return list(map(int, input().split()))
[c, v0, v1, a, l] = list_input()
y = 0
for d in range(1, c + 1):
	x = v0 + (d - 1) * a
	x = min(x, v1)
	if d > 1:
		x -= l
	y += x
	if y >= c:
		print(d)
		exit(0)


import math
import time
st = input().split()
c = int(st[0])
v0 = int(st[1])
v1 = int(st[2])
a = int(st[3])
l = int(st[4])
i = 0
d = 0
while i < c:
	if v0 + d * a < v1:
		i += v0 + d * a
	else:
		i += v1
	d += 1
	if d != 1:
		i -= l
print(d)


(c, x, y, a, l) = map(int, input().split())
s = x
d = x
i = 1
while s < c:
	d = min(d + a, y)
	s += d - l
	i += 1
print(i)


(c, v0, v1, a, l) = map(int, input().split())
for v in range(1, 1001):
	c -= v0 if v == 1 else v0 - l
	if c <= 0:
		print(v)
		break
	v0 = min(v0 + a, v1)
	v += 1


(c, v1, v2, a, l) = map(int, input().split())
d = 0
i = 1
d += v1
while d < c:
	v1 += a
	i += 1
	if v1 >= v2:
		v1 = v2
	d = d + v1
	d -= l
print(i)


(c, v0, v1, a, l) = input().split()
(c, v0, v1, a, l) = [int(c), int(v0), int(v1), int(a), int(l)]
page_covered = v0
ans = 1
while page_covered != c and page_covered < c:
	if v0 + ans * a <= v1:
		page_covered += v0 + ans * a - l
	else:
		page_covered += v1 - l
	ans += 1
print(ans)


(c, v0, v1, a, l) = map(int, input().split())
cur = cnt = 0
while cur < c:
	cur = max(0, cur - l)
	cur += min(v1, v0 + a * cnt)
	cnt += 1
print(cnt)


lines = input().split()
c = int(lines[0])
v0 = int(lines[1])
v1 = int(lines[2])
a = int(lines[3])
l = int(lines[4])
r = 0
days = 0
while r < c:
	if r != 0:
		r -= l
	r += v0
	v0 += a
	if v0 > v1:
		v0 = v1
	days += 1
print(days)


(c, v0, v1, a, l) = (int(i) for i in input().split())
d = 1
sum = v0
v = 0
while sum < c:
	v = min(v0 + a * d, v1)
	sum = sum + v - l
	d = d + 1
print(d)


(c, v0, v1, acc, l) = map(int, input().split())
totalPages = 0
days = 1
while True:
	totalPages += min(v1, v0 + max(0, days - 1) * acc)
	if totalPages >= c:
		print(days)
		exit()
	days += 1
	totalPages -= l


(c, v0, v1, a, l) = list(map(int, input().split(' ')))
count = 1
sum = v0
while sum < c:
	sum += min(v0 + count * a - l, v1 - l)
	count += 1
print(count)


(c, v0, v1, a, l) = [int(x) for x in input().strip().split()]
i = 1
read = 0
while read < c:
	if i > 1:
		read -= l
	read += min(v0 + (i - 1) * a, v1)
	i += 1
print(i - 1)


(c, v0, v1, a, l) = [int(x) for x in input().split()]
currPage = v0
day = 1
x = v0
while currPage < c:
	x = min(v1, x + a)
	currPage += x - l
	day += 1
print(day)


(c, v0, v1, a, l) = list(map(int, input().split()))
days = 1
cur_page = v0
speed = v0 + a
if speed > v1:
	speed = v1
if cur_page >= c:
	pass
else:
	while cur_page < c:
		cur_page -= l
		cur_page += speed
		days += 1
		speed = speed + a
		if speed > v1:
			speed = v1
print(days)


import math
(c, v0, v1, a, l) = map(int, input().split())
n = 0
ans = 0
while n < c:
	ans += 1
	if n > 0:
		n -= l
	n += v0
	if v0 < v1:
		v0 = min(v0 + a, v1)
print(ans)


(c, v0, v1, a, L) = map(int, input().split())
t = 0
while True:
	c -= min(v0 + a * t, v1)
	if c < 1:
		print(t + 1)
		break
	c += L
	t += 1


import math
s = input()
arr = s.split()
totalPages = int(arr[0])
firstDayPages = int(arr[1])
maxPages = int(arr[2])
acceleration = int(arr[3])
reRead = int(arr[4])
readedPages = 0
day = 0

def getPagesOnDay(day):
	global firstDayPages, maxPages, acceleration, readedPages
	pages = firstDayPages + (day - 1) * acceleration
	if pages > maxPages:
		pages = maxPages
	if day > 1:
		pages = pages - reRead
	return pages
while True:
	day = day + 1
	readedPages = readedPages + getPagesOnDay(day)
	if readedPages >= totalPages:
		break
print(day)


import re
import sys
import math
import string
I = list(map(int, input().strip().split(' ')))
(c, v0, v1, a, l) = I
(t, i) = (c - v0, 1)
while True:
	if t <= 0:
		print(i)
		break
	if v0 + a * i > v1:
		t = t - (v1 - l)
	else:
		t = t - (v0 + a * i - l)
	i = i + 1


def ri():
	return int(input())

def rli():
	return list(map(int, input().split()))

def rls():
	return list(input())

def pli(a):
	return ''.join(list(map(str, a)))
(c, v0, v1, a, l) = rli()
read = 0
for i in range(1, 2000):
	read += min(v0 + (i - 1) * a, v1)
	if c <= read:
		print(i)
		break
	read -= l


(c, v0, v1, a, l) = map(int, input().split())
(r, d) = (0, 1)
v = v0
while True:
	if r != 0:
		r -= l
	r += v
	if r >= c:
		print(d)
		break
	v = min(v1, v + a)
	d += 1


from sys import exit
(c, v0, v1, a, l) = map(int, input().split())
v = v0
t = 1
last = v0
if last >= c:
	print(1)
	exit(0)
while last < c:
	v = min(v1, v0 + t * a) - l
	last += v
	t += 1
print(t)


(c, v0, v1, a, l) = map(int, input().split())
pages_read = v0
if v0 >= c:
	print(1)
	exit()
for d in range(2, 10000):
	v0 = min(v0 + a, v1)
	pages_read += v0 - l
	if pages_read >= c:
		print(d)
		break


(c, v0, v1, a, l) = map(int, input().split())
cur = v0
rem = c
tmp = 0
res = 0
while rem > 0:
	res += 1
	rem = rem - (cur - tmp)
	cur = min(cur + a, v1)
	tmp = l
print(res)


(c, v0, v1, a, l) = map(int, input().split())
(s, ans) = (0, 0)
while s < c:
	s += min((v0 + ans * a, v1)) - (ans != 0) * l
	ans += 1
print(ans)


def main():
	[c, v0, v1, a, l] = [int(_) for _ in input().split()]
	days = 0
	n_pages_read = 0
	while n_pages_read < c:
		today_speed = min(v1, v0 + days * a)
		if n_pages_read == 0:
			n_pages_read = today_speed
		else:
			n_pages_read += today_speed - l
		days += 1
	print(days)
main()


(c, v0, v1, a, l) = map(int, input('').split())
p = v0
add = v0
count = 1
while p < c:
	add = min(v1, add + a)
	p += add - l
	count += 1
print(count)


(c, v0, v1, a, l) = [int(j) for j in input().split()]
for i in range(1, 1000000):
	c -= v0
	if i > 1:
		c += l
	if c <= 0:
		print(i)
		break
	v0 += a
	v0 = min(v0, v1)


(c, v0, v1, a, l) = map(int, input().split())
s = v0
f = 1
i = 1
c -= v0
while c > 0:
	s = v0 + a * i
	if s > v1:
		s = v1
	c += l
	c -= s
	f += 1
	if c <= 0:
		break
	i += 1
print(f)


(c, v0, v1, a, l) = map(int, input().split())
e = v0
f = 1
if c <= v0:
	f = 1
else:
	while e < c:
		v0 = min(v1, v0 + a)
		f += 1
		e = e - l + v0
print(f)


inputs = [int(x) for x in input().split(' ')]
book_pages = inputs[0]
init_speed = inputs[1]
maxi_speed = inputs[2]
accelerate = inputs[3]
re_reading = inputs[4]
days = 0
pages_read = 0
override = False
if book_pages / init_speed <= 1:
	override = True
while pages_read < book_pages:
	if pages_read == 0:
		pages_read += init_speed
	else:
		pages_read += init_speed - re_reading
	init_speed = min(init_speed + accelerate, maxi_speed)
	days += 1
if override:
	print(1)
else:
	print(days)


inp = input()
inpL = inp.split(' ')
c = int(inpL[0])
v0 = int(inpL[1])
v1 = int(inpL[2])
a = int(inpL[3])
l = int(inpL[4])
ans = 0
mul = 0
oc = c
isFirst = True
while c > 0:
	ans = ans + 1
	r = v0 + mul * a
	if r > v1:
		r = v1
	c = c + l
	if c > oc:
		c = oc
	c = c - r
	mul = mul + 1
print(ans)


(c, v0, v1, a, l) = map(int, input().split())
i = 0
k = 0
while k < c:
	li = 0 if i == 0 else 1
	k += min(v0 + i * a - li * l, v1 - li * l)
	i += 1
print(i)


import math
(c, v0, v1, a, l) = map(int, input().split())
now = 0
v = v0
for x in range(1000):
	x += 1
	if now != 0:
		now += v - l
	else:
		now += v
	v = min(v + a, v1)
	if now >= c:
		print(x)
		exit()


def readi(day, v0, a, v1):
	return min(v0 + (day - 1) * a, v1)
inp = input().split()
c = int(inp[0])
v0 = int(inp[1])
v1 = int(inp[2])
a = int(inp[3])
l = int(inp[4])
day = 1
read = min(v0, v1)
while read < c:
	read -= l
	day += 1
	read += readi(day, v0, a, v1)
print(day)


(book_len, v0, v_max, a, reread) = map(int, input().split())
pos = 1
first_day = True
days = 0
while pos < book_len + 1:
	if first_day != True:
		pos -= reread
		if pos < 1:
			pos = 1
	pos += v0
	if v0 < v_max:
		v0 += a
		if v0 > v_max:
			v0 = v_max
	days += 1
	first_day = False
print(days)


from collections import deque as de
import math
import sys
import re
from collections import Counter as cnt
from functools import reduce
from typing import MutableMapping
from itertools import groupby as gb
from fractions import Fraction as fr
from bisect import bisect_left as bl, bisect_right as br

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

class My_stack:

	def __init__(self):
		self.data = []

	def my_push(self, x):
		return self.data.append(x)

	def my_pop(self):
		return self.data.pop()

	def my_peak(self):
		return self.data[-1]

	def my_contains(self, x):
		return self.data.count(x)

	def my_show_all(self):
		return self.data

	def isEmpty(self):
		return len(self.data) == 0
arrStack = My_stack()

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binarytodecimal(n):
	return int(n, 2)

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def get_prime_factors(number):
	prime_factors = []
	while number % 2 == 0:
		prime_factors.append(2)
		number = number / 2
	for i in range(3, int(math.sqrt(number)) + 1, 2):
		while number % i == 0:
			prime_factors.append(int(i))
			number = number / i
	if number > 2:
		prime_factors.append(int(number))
	return prime_factors

def get_frequency(list):
	dic = {}
	for ele in list:
		if ele in dic:
			dic[ele] += 1
		else:
			dic[ele] = 1
	return dic

def Log2(x):
	return math.log10(x) / math.log10(2)

def getProduct(n):
	product = 1
	while n != 0:
		product = product * (n % 10)
		n = n // 10
	return product

def dupconscount(nums):
	element = []
	freque = []
	if not nums:
		return element
	running_count = 1
	for i in range(len(nums) - 1):
		if nums[i] == nums[i + 1]:
			running_count += 1
		else:
			freque.append(running_count)
			element.append(nums[i])
			running_count = 1
	freque.append(running_count)
	element.append(nums[i + 1])
	return (element, freque)

def lcm(x, y):
	lcm = x * y // math.gcd(x, y)
	return lcm

def isPowerOfTwo(n):
	return math.ceil(Log2(n)) == math.floor(Log2(n))

def checkisap(list):
	d = list[1] - list[0]
	for i in range(2, len(list)):
		temp = list[i] - list[i - 1]
		if temp != d:
			return False
	return True

def ceildiv(x, y):
	return (x + y - 1) // y

def di():
	return map(int, input().split())

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def si():
	return list(map(str, input()))

def indic():
	dic = {}
	for (index, value) in enumerate(input().split()):
		dic[int(value)] = int(index) + 1
	return dic
(c, v0, v1, a, l) = di()
for i in range(10000):
	curspeed = v0 + i * a
	if curspeed >= v1:
		curspeed = v1
	if i > 0:
		c += l
	c -= curspeed
	if c <= 0:
		break
print(i + 1)


(c, v0, v1, a, l) = list(map(int, input().split()))
pages = v0
s = 1
while pages < c:
	if v0 + s * a > v1:
		pages += v1 - l
	else:
		pages += v0 + s * a - l
	s += 1
print(s)


(c, v0, v1, a, l) = map(int, input().split())
if c <= v0:
	print(1)
	exit(0)
c -= v0
c += l
tot = 1
while True:
	if v0 + tot * a <= v1:
		c -= v0 + tot * a
	else:
		c -= v1
	tot += 1
	if c <= 0:
		break
	c += l
print(tot)


(c, v0, v1, a, l) = map(int, input().split())
dcnt = 1
c = c - v0
a1 = a
while c > 0:
	dcnt += 1
	if v0 + a > v1:
		c = c + l - v1
	else:
		c = c + l - (v0 + a)
		a = dcnt * a1
print(dcnt)


(c, v0, v1, a, l) = map(int, input().split())
(p, d) = (v0, 1)
while p < c:
	if v0 + a <= v1:
		v0 += a
	else:
		v0 = v1
	p -= l
	if p < 0:
		p = 0
	p += v0
	d += 1
	if p >= c:
		break
print(d)


(c, v0, v1, a, l) = map(int, input().split())
days = 1
pages_read = v0
count = 1
while pages_read < c:
	pages_read += min(v1, v0 + a * count)
	pages_read -= l
	days += 1
	count += 1
print(days)


IL = lambda : list(map(int, input().split()))
IS = lambda : input().split()
I = lambda : int(input())
S = lambda : input()
(c, v0, v1, a, l) = IL()
r = 0
for i in range(10000):
	if r >= c:
		print(i)
		break
	v = min(v0 + i * a, v1)
	r = max(r - l, 0) + v


X = list(map(int, input().split()))
(Count, Pages) = (1, X[1])
while Pages < X[0]:
	(Pages, Count) = (Pages + min(X[2] - X[4], X[1] + Count * X[3] - X[4]), Count + 1)
print(Count)


(c, v0, v1, a, l) = list(map(int, input().split()))
pos = v0
t = 1
ad = v0
while pos < c:
	ad = min(v1, ad + a)
	pos += ad - l
	t += 1
print(t)


(c, v0, v1, a, l) = map(int, input().split())
pos = v0
day = 1
add = v0
while pos < c:
	add = min(v1, add + a)
	pos += add - l
	day += 1
print(day)


(c, v0, v1, a, l) = list(map(int, input().split()))
count = 1
i = 1
c = c - v0
while c > 0:
	c += l
	if v0 + a * i < v1:
		c -= v0 + a * i
		i += 1
		count += 1
	else:
		c -= v1
		count += 1
print(count)


(c, v0, v1, a, l) = map(int, input().split())
pages = v0
if pages >= c:
	print(1)
else:
	for i in range(1, 100000000):
		pages -= l
		pages += min(v0 + i * a, v1)
		if pages >= c:
			print(i + 1)
			exit()


(c, v, vmax, a, l) = map(int, input().split())
curDay = 0
curPage = 0
lPage = -1
while curPage < c:
	pageread = min(vmax, v + a * curDay)
	if lPage == -1:
		lPage = 1
	else:
		pageread -= l
	curPage += pageread
	curDay += 1
print(curDay)


import random
import math
import sys
a = [int(x) for x in input().split()]
done = 0
i = 0
while done < a[0]:
	t = a[1] + i * a[3]
	if t > a[2]:
		t = a[2]
	done = done + t
	i += 1
	if done < a[0]:
		done -= a[4]
print(i)


(c, v0, v1, a, l) = list(map(int, input().split()))
d = 0
p = 0
acc = v0
while p < c:
	if d == 0:
		p = v0
	else:
		p -= l - 1
		p += acc - 1
	d += 1
	acc = min(acc + a, v1)
print(d)


(c, v0, v1, a, l) = map(int, input().split())
sum1 = v0
days = 1
while sum1 < c:
	sum1 += min(v0 + days * a - l, v1 - l)
	days += 1
print(days)


(c, v0, v1, a, l) = map(int, input().split())
position = v0
days = 1
add = v0
while position < c:
	add = min(v1, add + a)
	position += add - l
	days += 1
print(days)


def list_input():
	return list(map(int, input().split()))

def map_input():
	return map(int, input().split())

def map_string():
	return input().split()
(c, v0, v1, a, l) = map_input()
cur = 0
cnt = 0
while cur < c:
	if cnt != 0:
		cur += min(v1, v0 + cnt * a) - l
	else:
		cur += min(v1, v0 + cnt * a)
	cnt += 1
print(cnt)


par = [int(i) for i in str(input()).split()]
(c, v0, v1, a, l) = (par[0], par[1], par[2], par[3], par[4])
read_pages = v0
speed_fac = 1
days = 1
if v0 >= c:
	print(days)
else:
	while True:
		days += 1
		cur_speed = min(v0 + speed_fac * a, v1)
		read_pages = read_pages + cur_speed - min(l, read_pages)
		if read_pages >= c:
			print(days)
			break
		speed_fac = speed_fac + 1


(c, v0, v1, a, l) = map(int, input().split())
ans = 0
cur = 0
v = v0
while cur < c:
	if ans > 0:
		cur -= l
	cur += v
	v = min(v + a, v1)
	ans += 1
print(ans)


(c, v0, v1, a, l) = list(map(int, input().split()))
speed = v0
progress = v0
ans = 1
while progress < c:
	speed += a
	if speed > v1:
		speed = v1
	progress += speed - l
	ans += 1
print(ans)


(c, v0, v1, a, l) = map(int, input().strip().split())
now = v0
cnt = 1
while now < c:
	now += min(v1, v0 + cnt * a) - l
	cnt += 1
print(cnt)


(c, v, v1, a, l) = map(int, input().split())
for i in range(1, 1000000):
	c -= v
	if i > 1:
		c += l
	if c <= 0:
		print(i)
		break
	v += a
	v = min(v, v1)


(c, v0, v1, a, l) = map(int, input().split())
t = v0
k = 1
while t < c:
	v0 = v0 + a
	if v0 > v1:
		v0 = v1
	t = t - l + v0
	k += 1
print(k)


from aifc import Aifc_read
(c, v0, v1, a, l) = map(int, input().split())
m_r = v1 - l
t = 1
c_r = v0 - l
c_p = min(v0, v1)
while c_p < c:
	c_r = min(m_r, c_r + a)
	c_p = max(0, c_p + c_r)
	t += 1
print(t)


(c, v0, v1, a, l) = map(int, input().split())
result = number = 0
while number < c:
	number += v0
	v0 += a
	if v0 >= v1:
		v0 = v1
	if number < c:
		number -= l
	result += 1
print(result)


from sys import exit
(c, v0, v1, a, l) = [int(i) for i in input().split()]
if v0 >= c:
	print(1)
	exit(0)
else:
	d = 1
	cnt = c - v0
	ca = 0
	while cnt > 0:
		ca += a
		cr = v0 + ca
		if cr > v1:
			cr = v1
		cnt -= cr - l
		d += 1
	print(d)


import os
import sys
import math
import heapq
from decimal import *
from io import BytesIO, IOBase
from collections import defaultdict, deque

def r():
	return int(input())

def rm():
	return map(int, input().split())

def rl():
	return list(map(int, input().split()))
(c, v0, v1, a, l) = rm()
days = 1
c -= v0
y = v0
while c > 0:
	toread = y + a
	y = min(toread, v1)
	c -= y - l
	days += 1
print(days)


(c, v0, v1, a, l) = [int(x) for x in input().split(' ')]
days = 1
total = v0
while True:
	if total >= c:
		break
	days += 1
	v0 += a
	if v0 >= v1:
		v0 = v1
	total += v0 - l
print(days)


(c, v1, v2, a, l) = map(int, input().split())
read = 0
res = 0
vc = v1
while read < c:
	back = min(read, l)
	read += vc - back
	vc = min(vc + a, v2)
	res += 1
print(res)


(c, v0, v1, a, l) = list(map(int, input().split()))
c = max(0, c - v0)
current_capa = v0
days = 1
while c > 0:
	c += l
	current_capa = min(v1, current_capa + a)
	c -= current_capa
	days += 1
print(days)


(c, v0, v1, a, l) = input().split()
(c, v0, v1, a, l) = [int(c), int(v0), int(v1), int(a), int(l)]
(d, r) = (1, v0)
while r < c:
	r += min(v0 + a * d, v1) - l
	d += 1
print(d)


(c, v, v1, a, l) = map(int, input().split())
s = v
c -= v
days = 1
while c > 0:
	c += l
	v = s + days * a
	if v > v1:
		v = v1
	c -= v
	days += 1
print(days)


def read(s=''):
	return [int(e) for e in input(s).split()]
(c, v0, v1, a, l) = read()
counter = 0
if c > 0:
	c = c - v0
	counter = counter + 1
cv = v0
while c > 0:
	c = c + l
	if cv + a <= v1:
		cv = cv + a
		c = c - cv
	else:
		cv = v1
		c = c - cv
	counter = counter + 1
print(counter)


(c, v0, v1, a, l) = map(int, input().split())
counter = 0
while c > 0:
	c -= v0
	v0 += a
	if v0 > v1:
		v0 = v1
	counter += 1
	if counter >= 1 and c > 0:
		c += l
print(counter)


(c, v0, v1, a, l) = [int(i) for i in input().split()]
if v0 >= c:
	print(1)
	return
else:
	d = 1
	cnt = c - v0
	ca = 0
	while cnt > 0:
		ca += a
		cr = v0 + ca
		if cr > v1:
			cr = v1
		cnt -= cr - l
		d += 1
	print(d)


def MisterBandBookReading(c, v0, v1, a, l):
	n = 1
	cntOfPagesRead = v0
	while cntOfPagesRead < c:
		PagesRead = v0 + n * a
		if PagesRead <= v1:
			cntOfPagesRead += PagesRead - l
		else:
			cntOfPagesRead += v1 - l
		n += 1
	return n

def MisterBandBookReadingSolution(c, v0, v1, a, l):
	n = 1
	cntOfPagesRead = v0
	add = v0
	while cntOfPagesRead < c:
		add = min(v1, add + a)
		cntOfPagesRead += add - l
		n += 1
	return n
(c, v0, v1, a, l) = [int(x) for x in input().split()]
print(MisterBandBookReading(c, v0, v1, a, l))


a = list(map(int, input().split()))
c = a[0]
v0 = a[1]
v1 = a[2]
A = a[3]
l = a[4]
i = 0
k = 0
while c > 0:
	if v1 > v0 + i * A:
		c -= v0 + i * A
		i += 1
	else:
		c -= v1
	k += 1
	if c <= 0:
		break
	else:
		c += l
print(k)


(n, v, m, a, r) = map(int, input().split())
c = i = 0
while i < n:
	if i > 1:
		i -= r
	i += min(v + c * a, m)
	c += 1
print(c)


from math import ceil
(t, a, h, d, l) = map(int, input().split())
c = 0
x = a
y = 0
while t > 0:
	t -= x
	x += d
	if x > h:
		x = h
	t += y
	c += 1
	y = l
print(c)


(d, a, b, c, l) = map(int, input().split())
r = 0
while (r > 0) * l + d > a:
	d -= a - (r > 0) * l
	a = min(a + c, b)
	r += 1
print(r + 1)


def read():
	S = input()
	sList = S.split()
	sList = [int(_) for _ in sList]
	c = sList[0]
	v0 = sList[1]
	v1 = sList[2]
	a = sList[3]
	l = sList[4]
	red = 0
	cnt = 0
	while c > red:
		if cnt >= 1:
			red -= l
		red += v0
		if v0 < v1:
			v0 += a
		if v0 > v1:
			v0 = v1
		cnt += 1
	print(cnt)
read()


(c, v0, v1, a, l) = map(int, input().split())
x = v0
m = 1
i = 1
while x < c:
	y = v0 + i * a
	i += 1
	if y > v1:
		y = v1
	x += y
	x -= l
	m += 1
print(m)


def find(c, v0, v1, a, l):
	day = 0
	page = 0
	init = c
	while page < init:
		canread = min(v0 + day * a, v1)
		if day == 0:
			page += canread
			day += 1
		else:
			canread -= min(l, page)
			page += canread
			day += 1
	return day
(c, v0, v1, a, l) = list(map(int, input().strip().split(' ')))
print(find(c, v0, v1, a, l))


(s, str1, str2, a, differ) = map(int, input().split(' '))
days = 0
while s > 0:
	if days > 0:
		s += differ
	s -= str1
	str1 += a
	if str2 < str1:
		str1 = str2
	days += 1
print(days)


a = input()
a = a.split()
a = list(map(int, a))
(c, v0, v1, aa, l) = a
d = 0
while c > 0:
	d = d + 1
	c = c - v0
	if c > 0:
		c = c + l
	v0 = min(v0 + aa, v1)
print(d)


(c, v0, v1, a, l) = list(map(int, input().split()))
ans = 0
tmp = 0
fa = 0
while True:
	temp = v0 + fa * a
	if temp >= v1:
		tmp += v1
	else:
		tmp += temp
	ans += 1
	if tmp >= c:
		break
	fa += 1
	tmp -= l
print(ans)


inp = input().split()
c = int(inp[0])
v0 = int(inp[1])
v1 = int(inp[2])
a = int(inp[3])
l = int(inp[4])
nbpagerest = c
day = 1
while nbpagerest >= 0:
	if day > 1:
		nbpagerest = nbpagerest + l
		if v0 + (day - 1) * a <= v1:
			nbpagerest = nbpagerest - v0 - (day - 1) * a
		else:
			nbpagerest = nbpagerest - v1
	else:
		nbpagerest = nbpagerest - v0
	if nbpagerest <= 0:
		break
	day = day + 1
print(day)


cv0v1al = input().split()
c = int(cv0v1al[0])
v0 = int(cv0v1al[1])
v1 = int(cv0v1al[2])
a = int(cv0v1al[3])
l = int(cv0v1al[4])
c_now = 0
days = 0
if v0 == 0 and a == 0:
	print(0)
elif v0 == 0 and v1 == 0:
	print(0)
elif v0 == 0 and a > v1:
	print(0)
else:
	while c_now < c:
		if days == 0 and c_now == 0:
			c_now += v0
			days += 1
		else:
			if v0 + a <= v1:
				v0 += a
			else:
				v0 = v1
			if v0 - l == 0 and a == 0 and (l > 0):
				days = 0
				break
			c_now += v0 - l
			days += 1
	print(days)


import sys
import collections
import math
input = sys.stdin.readline

def printnl(val):
	sys.stdout.write(str(val) + '\n')
(c, v0, v1, a, l) = map(int, input().split())
start = v0
passed = 1
ans = v0
while start < c:
	ans = min(v1, ans + a)
	start += ans - l
	passed += 1
print(passed)


(c, v0, v1, a, l) = map(int, input().split())
cc = 0
ans = 0
while cc < c:
	if ans == 0:
		ans += 1
		cc += v0
		v0 += a
		v0 = min(v1, v0)
	else:
		ans += 1
		cc += v0
		v0 += a
		v0 = min(v1, v0)
		cc -= l
print(ans)


(c, v0, v1, a, l) = map(int, input().split())
(i, page) = (0, v0)
day = 1
while page < c:
	i += 1
	if v0 + i * a > v1:
		page += v1 - l
	else:
		page += v0 + i * a - l
	day += 1
print(day)


(c, v0, v1, a, l) = map(int, input().strip().split(' '))
tp = c - min(v0, v1)
ans = 1
if tp <= 0:
	ans = 1
else:
	i = 1
	while tp > 0:
		cp = v0 + i * a
		cp = min(v1, cp)
		tp = tp - cp + l
		ans += 1
		i += 1
print(ans)


(c, v0, v1, a, l) = map(int, input().split())
i = 0
suma = 0
greitis = v0
t = True
while suma < c and t:
	i += 1
	suma += greitis
	if greitis + a < v1:
		greitis += a
	else:
		greitis = v1
	if suma >= c:
		t = False
	suma -= l
print(i)


(c, v0, v1, a, l) = map(int, input().split())
cur = 0
cnt = 0
cntp = 0
while True:
	cnt += 1
	cntp = v0
	if cnt > 1:
		cntp -= l
	v0 = min(v1, v0 + a)
	cur += cntp
	if cur >= c:
		print(cnt)
		quit()


R = lambda : map(int, input().split())
(c, v, u, a, l) = R()
ans = 1
c -= v
while c > 0:
	ans += 1
	v = min(u, v + a)
	c -= v - l
print(ans)


(c, v0, v1, a, l) = map(int, input().strip().split())
res = 0
cur = v0
while c > 0:
	if res == 0:
		res = res + 1
		c -= cur
	else:
		res = res + 1
		c -= cur - l
	cur = min(a + cur, v1)
print(res)


(c, v0, v1, a, l) = map(int, input().split())
count = 0
days = 0
while 1:
	if days == 0:
		days += 1
		count += v0
		index = 0
	else:
		count += min(v0 + days * a, v1) - l
		days += 1
	if count >= c:
		break
print(days)


import sys
import math
(c, v0, v1, a, l) = [int(x) for x in sys.stdin.readline().split()]
d = 0
while c > 0:
	lines = min(v0 + d * a, v1)
	c += min(1, d) * l - lines
	d += 1
print(d)


(c, v0, v1, a, l) = [int(i) for i in input().split()]
if v0 >= c:
	print(1)
else:
	m = v0
	t = 1
	z = a
	while m < c:
		m -= l
		h = v0 + z
		if h > v1:
			h = v1
		else:
			z += a
		m += h
		t += 1
	print(t)


from fractions import Fraction
import sys
import bisect
import heapq
from math import *
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
import statistics
from statistics import mode
from functools import reduce
mod = 1000000007

def inp():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def graph(vertex):
	return [[] for i in range(0, vertex + 1)]

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def most_frequent(List):
	occurence_count = Counter(List)
	return occurence_count.most_common(1)[0][0]

def most_common(List):
	return mode(List)

def chinese_remainder(a, p):
	prod = reduce(op.mul, p, 1)
	x = [prod // pi for pi in p]
	return sum((a[i] * pow(x[i], p[i] - 2, p[i]) * x[i] for i in range(len(a)))) % prod

def createMatrix(rowCount, colCount, dataList):
	mat = []
	for i in range(rowCount):
		rowList = []
		for j in range(colCount):
			if dataList[j] not in mat:
				rowList.append(dataList[j])
		mat.append(rowList)
	return mat

def isprime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True
import collections

def minimalFilps1(bits):
	n = len(bits)
	flipsFromLeft = [0 for i in range(n)]
	flipsFromRight = [0 for i in range(n)]
	flips = 0
	for i in range(0, n, 1):
		if bits[i] == '1':
			flips = flips + 1
		flipsFromLeft[i] = flips
	flips = 0
	i = n - 1
	while i >= 0:
		if bits[i] == '0':
			flips = flips + 1
		i = i - 1
		flipsFromRight[i] = flips
	minFlips1 = sys.maxsize
	for i in range(1, n, 1):
		if flipsFromLeft[i - 1] + flipsFromRight[i] < minFlips1:
			minFlips1 = flipsFromLeft[i - 1] + flipsFromRight[i]
	return minFlips1

def minimalFilps(bits):
	n = len(bits)
	flipsFromLeft = [0 for i in range(n)]
	flipsFromRight = [0 for i in range(n)]
	flips = 0
	for i in range(0, n, 1):
		if bits[i] == '0':
			flips = flips + 1
		flipsFromLeft[i] = flips
	flips = 0
	i = n - 1
	while i >= 0:
		if bits[i] == '1':
			flips = flips + 1
		i = i - 1
		flipsFromRight[i] = flips
	minFlips = sys.maxsize
	for i in range(1, n, 1):
		if flipsFromLeft[i - 1] + flipsFromRight[i] < minFlips:
			minFlips = flipsFromLeft[i - 1] + flipsFromRight[i]
	return minFlips

def oddn(n):
	for i in range(2, n + 1):
		if i % 2 != 0 and n % i == 0:
			return i
	return 3

def memoized(*args):
	if args in stored_results:
		return stored_results[args]
	else:
		result = stored_results[args] = fn(*args)
		return result
	return memoized
open_list = ['(']
close_list = [')']

def check(myStr):
	stack = []
	e = 0
	for i in myStr:
		if i in open_list:
			stack.append(i)
		elif i in close_list:
			pos = close_list.index(i)
			if len(stack) > 0:
				stack.pop()
				e += 1
	return e
(c, v0, v1, a, l) = map(int, input().split())
b = v0
c = c - b
d = 1
if c == 0:
	print(d)
else:
	i = 1
	while c > 0:
		c = c + l
		b += i * a
		if b > v1:
			b = v1
		c -= b
		d += 1
	i += 1
	print(d)
import operator
open_list = ['(']
close_list = [')']

def check(myStr):
	stack = []
	e = 0
	for i in myStr:
		if i in open_list:
			stack.append(i)
		elif i in close_list:
			pos = close_list.index(i)
			if len(stack) > 0:
				stack.pop()
				e += 1
	return e


(c, v0, v1, a, l) = map(int, input().split())
if c <= v0:
	print(1)
else:
	mp = v0
	cur = v0
	cnt = 1
	while mp < c:
		cur = min(cur + a, v1)
		mp += cur - l
		cnt += 1
	print(cnt)


a = input().split()
day = 1
s = int(a[0])
d = int(a[1])
m = int(a[2])
s -= d
if s <= 0:
	print(day)
	exit()
while s > 0:
	day += 1
	read = d + (day - 1) * int(a[-2])
	if read > m:
		read = m
	read -= int(a[-1])
	s -= read
print(day)


a = input()
b = a.split(' ')
(c, v0, v1, a, l) = (int(b[0]), int(b[1]), int(b[2]), int(b[3]), int(b[4]))
day = 1
while c > 0:
	if day > 1:
		c = c + l
	c = c - min(v0 + a * (day - 1), v1)
	if c <= 0:
		break
	day += 1
print(day)


(c, v, n, a, l) = map(int, input().split())
d = 1
c -= v
while c > 0:
	v += a
	if v > n:
		v = n
	c -= v - l
	d += 1
print(d)


(c, v0, v1, a, l) = map(int, input().split())
s = v0
n = 1
if v0 >= c:
	print(1)
	exit()
for i in range(1, 1000):
	x = v0 + a * i
	if x > v1:
		s += v1 - l
		n += 1
		if s >= c:
			print(n)
			exit()
	else:
		s += x - l
		n += 1
		if s >= c:
			print(n)
			exit()


def br(c, v0, v1, a, l):
	d = 1
	read = v0
	while read < c:
		d += 1
		read -= l
		v0 = min(v1, v0 + a)
		read += v0
	return d
(p0, p1, p2, p3, p4) = list(map(int, input().strip().split()))
print(br(p0, p1, p2, p3, p4))


(c, v0, v1, a, l) = map(int, input().split())
(ans, cur) = (1, v0)
while cur < c:
	v0 = min(v1, v0 + a)
	cur += v0 - l
	ans += 1
print(ans)


(c, v0, v1, a, l) = [int(x) for x in input().split()]
d = 1
read = v0
while True:
	if read >= c:
		break
	d += 1
	v0 += a
	if v0 >= v1:
		v0 = v1
	read += v0 - l
print(d)


(c, v0, v1, a, l) = map(int, input().split())
days = 1
i = 1
c -= v0
while c > 0:
	toread = v0 + i * a
	if toread > v1:
		toread = v1
	toread -= l
	c -= toread
	i += 1
	days += 1
print(days)


(c, v0, v1, a, l) = [int(x) for x in input().split(' ')]
pages = 0
i = 0
while True:
	pages += min(v0 + i * a, v1)
	i += 1
	if pages >= c:
		ans = i
		break
	pages -= l
print(ans)


string = input()
numbers = string.split(' ')
for x in range(5):
	numbers[x] = int(numbers[x])
a = numbers[0]
b = numbers[1]
c = numbers[2]
d = numbers[3]
e = numbers[4]
x = 0
days = 0
while x < a:
	if days > 0:
		x -= e
	x += b
	if b + d <= c:
		b += d
	else:
		b = c
	days += 1
print(days)


input_ints = list(map(int, input().split(' ')))
(n_pages, v_initial, max_v, a, setback) = input_ints
current_page = v_initial
current_speed = v_initial
day = 1
while current_page < n_pages:
	day += 1
	current_speed += a
	current_speed = min(current_speed, max_v)
	current_page += current_speed - setback
print(day)


(c, vv, v, a, l) = map(int, input().split())
v = v - l
read = vv
rate = vv + a - l
days = 1
while read < c:
	if rate < v:
		read += rate
		rate += a
		days += 1
	else:
		read += v
		days += 1
print(days)


(c, v0, v1, a, l) = map(int, input().split())
i = 0
num = 0
while num < c:
	if i != 0:
		num = max(num - l, 0)
	num += min(v1, v0 + a * i)
	i += 1
print(i)


def reading(pages, speed, max_speed, busting, fee):
	days = 1
	pages -= speed
	if pages <= 0:
		return days
	while speed + days * busting <= max_speed and pages > 0:
		pages -= -fee + days * busting + speed
		days += 1
		if pages <= 0:
			break
	while speed + fee + days * busting > max_speed and pages > 0:
		pages -= -fee + max_speed
		days += 1
		if pages <= 0:
			break
	return days
d = input()
(a, b, c, f, e) = d.split(' ')
print(reading(int(a), int(b), int(c), int(f), int(e)))


(c, v0, v1, a, l) = list(map(int, input().split()))
rem = c
days = 0
speed = v0
while rem != 0:
	if rem <= speed:
		rem = 0
		days += 1
	else:
		rem -= speed
		days += 1
		rem += l
	speed += a
	if speed >= v1:
		speed = v1
print(days)


(kstr, v0, v1, a, l) = map(int, input().split())
tektime = 1
tekstr = v0
tekv = v0 + a
if tekv > v1:
	tekv = v1
while tekstr < kstr:
	tekstr = tekstr - l + tekv
	tekv += a
	if tekv > v1:
		tekv = v1
	tektime += 1
print(tektime)


(c, v0, v1, a, l) = map(int, input().split())
for i in range(0, 1000):
	if i == 0:
		c -= v0
	else:
		v0 = v0 + a
		if v0 >= v1:
			v0 = v1
		c = c - v0 + l
	if c <= 0:
		break
i += 1
print(i)


import sys
input = sys.stdin.readline
(c, v0, v1, a, l) = map(int, input().split())
day = 0
read = 0
while True:
	if read >= c:
		break
	if v0 + a * day < v1:
		read += v0 + a * day
	else:
		read += v1
	if day > 0:
		read -= l
	day += 1
print(day)


def solution(c, v, v1, a, l):
	d = 0
	while True:
		c -= v
		d += 1
		if c <= 0:
			return d
		c += l
		if v < v1:
			v += a
			if v > v1:
				v = v1
(c, v, v1, a, l) = map(int, input().split())
print(solution(c, v, v1, a, l))


from sys import stdin, stdout
(c, v0, v1, a, l) = map(int, stdin.readline().split())
cnt = 0
ans = 0
while cnt < c:
	cnt += v0
	v0 = min(v0 + a, v1)
	ans += 1
	if cnt >= c:
		break
	cnt -= l
stdout.write(str(ans))